aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/CloneFunction.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-18 21:11:39 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-18 21:11:39 +0000
commit775438952693c261bf1b5a85143dea4f5852dcdf (patch)
treefa8e7f5c9677bc1375634402ce35a98c2c98160f /llvm/lib/Transforms/Utils/CloneFunction.cpp
parent8bee90d5f33f49d4ebcb89aac780916fe3bfc65d (diff)
downloadllvm-775438952693c261bf1b5a85143dea4f5852dcdf.zip
llvm-775438952693c261bf1b5a85143dea4f5852dcdf.tar.gz
llvm-775438952693c261bf1b5a85143dea4f5852dcdf.tar.bz2
Push some more methods down to hide the use of the Attribute class.
Because the Attribute class is going to stop representing a collection of attributes, limit the use of it as an aggregate in favor of using AttributeSet. This replaces some of the uses for querying the function attributes. llvm-svn: 172844
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CloneFunction.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index ccc3eae..ad753ab 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -103,10 +103,8 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
OldFunc->getAttributes()
.getRetAttributes()));
NewFunc->setAttributes(NewFunc->getAttributes()
- .addAttr(NewFunc->getContext(),
- AttributeSet::FunctionIndex,
- OldFunc->getAttributes()
- .getFnAttributes()));
+ .addFnAttributes(NewFunc->getContext(),
+ OldFunc->getAttributes()));
}