diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-01-30 23:40:31 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-01-30 23:40:31 +0000 |
commit | ac72eb264c3a8a15cda81aaead6adc8419058666 (patch) | |
tree | dedfbceb55713764692caed012129a8c0874c932 /lib | |
parent | e74365462a39529ae48ef4d34ec76b4543b8ea29 (diff) | |
download | llvm-ac72eb264c3a8a15cda81aaead6adc8419058666.tar.gz llvm-ac72eb264c3a8a15cda81aaead6adc8419058666.tar.bz2 llvm-ac72eb264c3a8a15cda81aaead6adc8419058666.tar.xz |
Remove addRetAttributes and addFnAttributes, which aren't useful abstractions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173992 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/IR/Core.cpp | 6 | ||||
-rw-r--r-- | lib/Transforms/IPO/PruneEH.cpp | 8 | ||||
-rw-r--r-- | lib/Transforms/Utils/CloneFunction.cpp | 10 |
3 files changed, 13 insertions, 11 deletions
diff --git a/lib/IR/Core.cpp b/lib/IR/Core.cpp index 1e3258f6aa..aaf661f082 100644 --- a/lib/IR/Core.cpp +++ b/lib/IR/Core.cpp @@ -1383,9 +1383,9 @@ void LLVMAddFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA) { const AttributeSet PAL = Func->getAttributes(); AttrBuilder B(PA); const AttributeSet PALnew = - PAL.addFnAttributes(Func->getContext(), - AttributeSet::get(Func->getContext(), - AttributeSet::FunctionIndex, B)); + PAL.addAttributes(Func->getContext(), AttributeSet::FunctionIndex, + AttributeSet::get(Func->getContext(), + AttributeSet::FunctionIndex, B)); Func->setAttributes(PALnew); } diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index 98c2602dde..73d9323195 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -147,10 +147,10 @@ bool PruneEH::runOnSCC(CallGraphSCC &SCC) { Function *F = (*I)->getFunction(); const AttributeSet &PAL = F->getAttributes(); const AttributeSet &NPAL = - PAL.addFnAttributes(F->getContext(), - AttributeSet::get(F->getContext(), - AttributeSet::FunctionIndex, - NewAttributes)); + PAL.addAttributes(F->getContext(), AttributeSet::FunctionIndex, + AttributeSet::get(F->getContext(), + AttributeSet::FunctionIndex, + NewAttributes)); if (PAL != NPAL) { MadeChange = true; F->setAttributes(NPAL); diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp index 12311c39a0..a309bce544 100644 --- a/lib/Transforms/Utils/CloneFunction.cpp +++ b/lib/Transforms/Utils/CloneFunction.cpp @@ -98,11 +98,13 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc, Anew->addAttr(OldFunc->getAttributes() .getParamAttributes(I->getArgNo() + 1)); NewFunc->setAttributes(NewFunc->getAttributes() - .addRetAttributes(NewFunc->getContext(), - OldFunc->getAttributes())); + .addAttributes(NewFunc->getContext(), + AttributeSet::ReturnIndex, + OldFunc->getAttributes())); NewFunc->setAttributes(NewFunc->getAttributes() - .addFnAttributes(NewFunc->getContext(), - OldFunc->getAttributes())); + .addAttributes(NewFunc->getContext(), + AttributeSet::FunctionIndex, + OldFunc->getAttributes())); } |