From: Bill Wendling Date: Mon, 21 Jan 2013 22:45:00 +0000 (+0000) Subject: Have AttributeSet::getRetAttributes() return an AttributeSet instead of Attribute. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b7abb30d77b79b929b6e52d58ca8dc89688a3f2b;p=platform%2Fupstream%2Fllvm.git 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 --- diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 5e09e47..aab21a2 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();