diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-01-22 21:15:51 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-01-22 21:15:51 +0000 |
commit | defaca00b8087d452df2b783250a48a32658a910 (patch) | |
tree | dcc4e29343864e54bcfd33035512ca7d6e2bef74 /lib/Transforms/IPO/PruneEH.cpp | |
parent | 5de048ec30f9ef9f56c89f9fdb50022beca6ae88 (diff) |
More encapsulation work.
Use the AttributeSet when we're talking about more than one attribute. Add a
function that adds a single attribute. No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173196 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/PruneEH.cpp')
-rw-r--r-- | lib/Transforms/IPO/PruneEH.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index d872f0cfba..98c2602dde 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -146,9 +146,11 @@ bool PruneEH::runOnSCC(CallGraphSCC &SCC) { Function *F = (*I)->getFunction(); const AttributeSet &PAL = F->getAttributes(); - const AttributeSet &NPAL = PAL.addAttr(F->getContext(), ~0, - Attribute::get(F->getContext(), - NewAttributes)); + const AttributeSet &NPAL = + PAL.addFnAttributes(F->getContext(), + AttributeSet::get(F->getContext(), + AttributeSet::FunctionIndex, + NewAttributes)); if (PAL != NPAL) { MadeChange = true; F->setAttributes(NPAL); |