diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-01-23 06:14:59 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-01-23 06:14:59 +0000 |
commit | 28d65722d6f283b327b5815914382077fe9c0ab4 (patch) | |
tree | 2edfbefbb4ed020a14b308718f9ccecebfaa0c6b /lib/IR/Core.cpp | |
parent | d3afa9be99e504350582f08ffc4cd05cf928db6a (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173228 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Core.cpp')
-rw-r--r-- | lib/IR/Core.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/IR/Core.cpp b/lib/IR/Core.cpp index 0e42536789..1e3258f6aa 100644 --- a/lib/IR/Core.cpp +++ b/lib/IR/Core.cpp @@ -1467,13 +1467,13 @@ LLVMValueRef LLVMGetPreviousParam(LLVMValueRef Arg) { void LLVMAddAttribute(LLVMValueRef Arg, LLVMAttribute PA) { Argument *A = unwrap<Argument>(Arg); AttrBuilder B(PA); - A->addAttr(Attribute::get(A->getContext(), B)); + A->addAttr(AttributeSet::get(A->getContext(), A->getArgNo() + 1, B)); } void LLVMRemoveAttribute(LLVMValueRef Arg, LLVMAttribute PA) { Argument *A = unwrap<Argument>(Arg); AttrBuilder B(PA); - A->removeAttr(Attribute::get(A->getContext(), B)); + A->removeAttr(AttributeSet::get(A->getContext(), A->getArgNo() + 1, B)); } LLVMAttribute LLVMGetAttribute(LLVMValueRef Arg) { @@ -1484,10 +1484,10 @@ LLVMAttribute LLVMGetAttribute(LLVMValueRef Arg) { void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned align) { + Argument *A = unwrap<Argument>(Arg); AttrBuilder B; B.addAlignmentAttr(align); - unwrap<Argument>(Arg)->addAttr(Attribute:: - get(unwrap<Argument>(Arg)->getContext(), B)); + A->addAttr(AttributeSet::get(A->getContext(),A->getArgNo() + 1, B)); } /*--.. Operations on basic blocks ..........................................--*/ |