summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/FunctionAttrs.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/Transforms/IPO/FunctionAttrs.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/Transforms/IPO/FunctionAttrs.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/FunctionAttrs.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
index c267097c4a5..7e46dcb4296 100644
--- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -215,8 +215,9 @@ bool FunctionAttrs::AddReadAttrs(const CallGraphSCC &SCC) {
AttrBuilder B;
B.addAttribute(Attribute::ReadOnly)
.addAttribute(Attribute::ReadNone);
- F->removeAttribute(AttributeSet::FunctionIndex,
- Attribute::get(F->getContext(), B));
+ F->removeAttributes(AttributeSet::FunctionIndex,
+ AttributeSet::get(F->getContext(),
+ AttributeSet::FunctionIndex, B));
// Add in the new attribute.
F->addAttribute(AttributeSet::FunctionIndex,
OpenPOWER on IntegriCloud