summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Core.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-23 00:45:55 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-23 00:45:55 +0000
commit430fa9bfb3aa13cd77b970c8994dfedd5fc38af5 (patch)
treecf330b57e4a857725749479e06946222212e33bf /llvm/lib/IR/Core.cpp
parentf8317679cb2dab9d06835e05bd5d69c0bd8f491f (diff)
downloadbcm5719-llvm-430fa9bfb3aa13cd77b970c8994dfedd5fc38af5.tar.gz
bcm5719-llvm-430fa9bfb3aa13cd77b970c8994dfedd5fc38af5.zip
Use the AttributeSet when removing multiple attributes. Use Attribute::AttrKind
when removing one attribute. This further encapsulates the use of the attributes. llvm-svn: 173214
Diffstat (limited to 'llvm/lib/IR/Core.cpp')
-rw-r--r--llvm/lib/IR/Core.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp
index e72eb699824..0e425367897 100644
--- a/llvm/lib/IR/Core.cpp
+++ b/llvm/lib/IR/Core.cpp
@@ -1394,8 +1394,9 @@ void LLVMRemoveFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA) {
const AttributeSet PAL = Func->getAttributes();
AttrBuilder B(PA);
const AttributeSet PALnew =
- PAL.removeAttr(Func->getContext(), AttributeSet::FunctionIndex,
- Attribute::get(Func->getContext(), B));
+ PAL.removeAttributes(Func->getContext(), AttributeSet::FunctionIndex,
+ AttributeSet::get(Func->getContext(),
+ AttributeSet::FunctionIndex, B));
Func->setAttributes(PALnew);
}
@@ -1686,9 +1687,10 @@ void LLVMRemoveInstrAttribute(LLVMValueRef Instr, unsigned index,
LLVMAttribute PA) {
CallSite Call = CallSite(unwrap<Instruction>(Instr));
AttrBuilder B(PA);
- Call.setAttributes(
- Call.getAttributes().removeAttr(Call->getContext(), index,
- Attribute::get(Call->getContext(), B)));
+ Call.setAttributes(Call.getAttributes()
+ .removeAttributes(Call->getContext(), index,
+ AttributeSet::get(Call->getContext(),
+ index, B)));
}
void LLVMSetInstrParamAlignment(LLVMValueRef Instr, unsigned index,
OpenPOWER on IntegriCloud