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
This commit is contained in:
Bill Wendling
2013-01-21 22:45:00 +00:00
parent c90d9f89b7
commit b7abb30d77

View File

@@ -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();