diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2013-03-02 01:20:18 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2013-03-02 01:20:18 +0000 |
commit | 1b97a9c82a2b3a45fcdeb566c6ae2fc5d85fd9bb (patch) | |
tree | 03fccdfd619b0d46c85008fa400ccb1b8cd4565a /llvm/lib/IR | |
parent | 643aa0e0dce7f2e6413b7e763f954b8fb2604360 (diff) | |
download | bcm5719-llvm-1b97a9c82a2b3a45fcdeb566c6ae2fc5d85fd9bb.tar.gz bcm5719-llvm-1b97a9c82a2b3a45fcdeb566c6ae2fc5d85fd9bb.zip |
Modify {Call,Invoke}Inst::addAttribute to take an AttrKind.
llvm-svn: 176397
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/Instructions.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp index 8a0a465a96b..2e3a5258268 100644 --- a/llvm/lib/IR/Instructions.cpp +++ b/llvm/lib/IR/Instructions.cpp @@ -331,12 +331,9 @@ CallInst::CallInst(const CallInst &CI) SubclassOptionalData = CI.SubclassOptionalData; } -void CallInst::addAttribute(unsigned i, Attribute attr) { +void CallInst::addAttribute(unsigned i, Attribute::AttrKind attr) { AttributeSet PAL = getAttributes(); - AttrBuilder B(attr); - LLVMContext &Context = getContext(); - PAL = PAL.addAttributes(Context, i, - AttributeSet::get(Context, i, B)); + PAL = PAL.addAttribute(getContext(), i, attr); setAttributes(PAL); } @@ -593,11 +590,9 @@ bool InvokeInst::paramHasAttr(unsigned i, Attribute::AttrKind A) const { return false; } -void InvokeInst::addAttribute(unsigned i, Attribute attr) { +void InvokeInst::addAttribute(unsigned i, Attribute::AttrKind attr) { AttributeSet PAL = getAttributes(); - AttrBuilder B(attr); - PAL = PAL.addAttributes(getContext(), i, - AttributeSet::get(getContext(), i, B)); + PAL = PAL.addAttribute(getContext(), i, attr); setAttributes(PAL); } |