aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit956f13440a4aa0297606a4412f4aa091d931592a (patch)
tree9f6f5438f51c7f91338256e9949a5588d575971c /lib/Transforms/Utils/CloneFunction.cpp
parente72fac60e3dbcf14ec68cedc1e86feafec1652eb (diff)
downloadexternal_llvm-956f13440a4aa0297606a4412f4aa091d931592a.zip
external_llvm-956f13440a4aa0297606a4412f4aa091d931592a.tar.gz
external_llvm-956f13440a4aa0297606a4412f4aa091d931592a.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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172844 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r--lib/Transforms/Utils/CloneFunction.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp
index ccc3eae..ad753ab 100644
--- a/lib/Transforms/Utils/CloneFunction.cpp
+++ b/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()));
}