From 49bc76cbb3072c077f684e93904df8bb46803210 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Wed, 23 Jan 2013 06:14:59 +0000 Subject: 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: 173228 --- llvm/lib/IR/Core.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/IR/Core.cpp') diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp index 0e425367897..1e3258f6aa1 100644 --- a/llvm/lib/IR/Core.cpp +++ b/llvm/lib/IR/Core.cpp @@ -1467,13 +1467,13 @@ LLVMValueRef LLVMGetPreviousParam(LLVMValueRef Arg) { void LLVMAddAttribute(LLVMValueRef Arg, LLVMAttribute PA) { Argument *A = unwrap(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(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(Arg); AttrBuilder B; B.addAlignmentAttr(align); - unwrap(Arg)->addAttr(Attribute:: - get(unwrap(Arg)->getContext(), B)); + A->addAttr(AttributeSet::get(A->getContext(),A->getArgNo() + 1, B)); } /*--.. Operations on basic blocks ..........................................--*/ -- cgit v1.2.3