Use AttributeSet accessor methods instead of Attribute accessor methods.

Further encapsulation of the Attribute object. Don't allow direct access to the
Attribute object as an aggregate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172853 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2013-01-18 21:53:16 +00:00
parent 1a17bd21ff
commit 1b0c54f1c5
8 changed files with 36 additions and 34 deletions

View File

@ -98,10 +98,8 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc,
Anew->addAttr( OldFunc->getAttributes()
.getParamAttributes(I->getArgNo() + 1));
NewFunc->setAttributes(NewFunc->getAttributes()
.addAttr(NewFunc->getContext(),
AttributeSet::ReturnIndex,
OldFunc->getAttributes()
.getRetAttributes()));
.addRetAttributes(NewFunc->getContext(),
OldFunc->getAttributes()));
NewFunc->setAttributes(NewFunc->getAttributes()
.addFnAttributes(NewFunc->getContext(),
OldFunc->getAttributes()));