aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/IPO
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-22 21:15:51 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-22 21:15:51 +0000
commitdefaca00b8087d452df2b783250a48a32658a910 (patch)
treedcc4e29343864e54bcfd33035512ca7d6e2bef74 /lib/Transforms/IPO
parent5de048ec30f9ef9f56c89f9fdb50022beca6ae88 (diff)
downloadexternal_llvm-defaca00b8087d452df2b783250a48a32658a910.zip
external_llvm-defaca00b8087d452df2b783250a48a32658a910.tar.gz
external_llvm-defaca00b8087d452df2b783250a48a32658a910.tar.bz2
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')
-rw-r--r--lib/Transforms/IPO/PruneEH.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp
index d872f0c..98c2602 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);