summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-30 23:40:31 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-30 23:40:31 +0000
commit785afdf3a48b3f38a0fd30edefc533ca1bf725f9 (patch)
tree3f703e68b800b3c4a390c0d322afacc6cf5dcc92 /llvm/lib
parent1a347f76c2d93a8d92cf8031c802d876d72cb637 (diff)
downloadbcm5719-llvm-785afdf3a48b3f38a0fd30edefc533ca1bf725f9.tar.gz
bcm5719-llvm-785afdf3a48b3f38a0fd30edefc533ca1bf725f9.zip
Remove addRetAttributes and addFnAttributes, which aren't useful abstractions.
llvm-svn: 173992
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/Core.cpp6
-rw-r--r--llvm/lib/Transforms/IPO/PruneEH.cpp8
-rw-r--r--llvm/lib/Transforms/Utils/CloneFunction.cpp10
3 files changed, 13 insertions, 11 deletions
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp
index 1e3258f6aa1..aaf661f0825 100644
--- a/llvm/lib/IR/Core.cpp
+++ b/llvm/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/llvm/lib/Transforms/IPO/PruneEH.cpp b/llvm/lib/Transforms/IPO/PruneEH.cpp
index 98c2602dde6..73d9323195b 100644
--- a/llvm/lib/Transforms/IPO/PruneEH.cpp
+++ b/llvm/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/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index 12311c39a0e..a309bce5448 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/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()));
}
OpenPOWER on IntegriCloud