forked from OSchip/llvm-project
Remove the last of uses that use the Attribute object as a collection of attributes.
Collections of attributes are handled via the AttributeSet class now. This finally frees us up to make significant changes to how attributes are structured. llvm-svn: 173229
This commit is contained in:
parent
49bc76cbb3
commit
ce2f9c5c63
|
@ -1191,7 +1191,8 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI,
|
|||
// Name the struct return argument.
|
||||
if (CGM.ReturnTypeUsesSRet(FI)) {
|
||||
AI->setName("agg.result");
|
||||
AI->addAttr(llvm::Attribute::get(getLLVMContext(),
|
||||
AI->addAttr(llvm::AttributeSet::get(getLLVMContext(),
|
||||
AI->getArgNo() + 1,
|
||||
llvm::Attribute::NoAlias));
|
||||
++AI;
|
||||
}
|
||||
|
@ -1263,7 +1264,8 @@ void CodeGenFunction::EmitFunctionProlog(const CGFunctionInfo &FI,
|
|||
llvm::Value *V = AI;
|
||||
|
||||
if (Arg->getType().isRestrictQualified())
|
||||
AI->addAttr(llvm::Attribute::get(getLLVMContext(),
|
||||
AI->addAttr(llvm::AttributeSet::get(getLLVMContext(),
|
||||
AI->getArgNo() + 1,
|
||||
llvm::Attribute::NoAlias));
|
||||
|
||||
// Ensure the argument is the correct type.
|
||||
|
|
|
@ -1965,9 +1965,12 @@ static void replaceUsesOfNonProtoConstant(llvm::Constant *old,
|
|||
}
|
||||
|
||||
// Add any parameter attributes.
|
||||
llvm::Attribute pAttrs = oldAttrs.getParamAttributes(argNo + 1);
|
||||
if (pAttrs.hasAttributes())
|
||||
newAttrs.push_back(llvm::AttributeWithIndex::get(argNo + 1, pAttrs));
|
||||
if (oldAttrs.hasAttributes(argNo + 1))
|
||||
newAttrs.
|
||||
push_back(llvm::AttributeWithIndex::
|
||||
get(newFn->getContext(),
|
||||
argNo + 1,
|
||||
oldAttrs.getParamAttributes(argNo + 1)));
|
||||
}
|
||||
if (dontTransform)
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue