aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
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
commited01f84d20a1586b2d639b47463cf1f22418f0f6 (patch)
treee374f06181b32878a03016c85dc7efe56e52b682 /lib/CodeGen
parentf11ccc1cbb26cacac36abebe6ce9add43bf32585 (diff)
Have AttributeSet::getRetAttributes() return an AttributeSet instead of Attribute.
This further restricts the use of the Attribute class to the Attribute family of classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173099 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index 5e09e47d54..aab21a2efb 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/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();