summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-21 22:45:00 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-21 22:45:00 +0000
commitb7abb30d77b79b929b6e52d58ca8dc89688a3f2b (patch)
treea658dd9f078f6d518b496eaa51d3e5e13d397d16 /clang/lib/CodeGen/CodeGenModule.cpp
parentc90d9f89b7d85c6b4ae3692a78046e1496c8537e (diff)
downloadbcm5719-llvm-b7abb30d77b79b929b6e52d58ca8dc89688a3f2b.tar.gz
bcm5719-llvm-b7abb30d77b79b929b6e52d58ca8dc89688a3f2b.zip
Have AttributeSet::getRetAttributes() return an AttributeSet instead of Attribute.
This further restricts the use of the Attribute class to the Attribute family of classes. llvm-svn: 173099
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 5e09e47d540..aab21a2efbc 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1939,9 +1939,10 @@ static void replaceUsesOfNonProtoConstant(llvm::Constant *old,
// Collect any return attributes from the call.
if (oldAttrs.hasAttributes(llvm::AttributeSet::ReturnIndex))
- newAttrs.push_back(llvm::AttributeWithIndex::get(
- llvm::AttributeSet::ReturnIndex,
- oldAttrs.getRetAttributes()));
+ newAttrs.push_back(
+ llvm::AttributeWithIndex::get(newFn->getContext(),
+ llvm::AttributeSet::ReturnIndex,
+ oldAttrs.getRetAttributes()));
// If the function was passed too few arguments, don't transform.
unsigned newNumArgs = newFn->arg_size();
OpenPOWER on IntegriCloud