summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/GlobalOpt.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-14 06:39:53 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-14 06:39:53 +0000
commit85a64c217f5fec92934ad3a12c5c8ebcc8f1fd9f (patch)
treeb3996b19ecb4274aa9fc764b58c5a782261bf8f5 /llvm/lib/Transforms/IPO/GlobalOpt.cpp
parent1fcc82225aef98314da4939f9c2c22f3a0af754c (diff)
downloadbcm5719-llvm-85a64c217f5fec92934ad3a12c5c8ebcc8f1fd9f.tar.gz
bcm5719-llvm-85a64c217f5fec92934ad3a12c5c8ebcc8f1fd9f.zip
Remove the bitwise NOT operator from the Attributes class. Replace it with the equivalent from the builder class.
llvm-svn: 165892
Diffstat (limited to 'llvm/lib/Transforms/IPO/GlobalOpt.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/GlobalOpt.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
index a1b976577a7..a32f35a8df7 100644
--- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp
+++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp
@@ -2061,7 +2061,7 @@ static void ChangeCalleesToFastCall(Function *F) {
}
}
-static AttrListPtr StripNest(const AttrListPtr &Attrs) {
+static AttrListPtr StripNest(LLVMContext &C, const AttrListPtr &Attrs) {
Attributes::Builder B;
B.addAttribute(Attributes::Nest);
@@ -2070,19 +2070,19 @@ static AttrListPtr StripNest(const AttrListPtr &Attrs) {
continue;
// There can be only one.
- return Attrs.removeAttr(Attrs.getSlot(i).Index, Attributes::get(B));
+ return Attrs.removeAttr(C, Attrs.getSlot(i).Index, Attributes::get(B));
}
return Attrs;
}
static void RemoveNestAttribute(Function *F) {
- F->setAttributes(StripNest(F->getAttributes()));
+ F->setAttributes(StripNest(F->getContext(), F->getAttributes()));
for (Value::use_iterator UI = F->use_begin(), E = F->use_end(); UI != E;++UI){
if (isa<BlockAddress>(*UI))
continue;
CallSite User(cast<Instruction>(*UI));
- User.setAttributes(StripNest(User.getAttributes()));
+ User.setAttributes(StripNest(F->getContext(), User.getAttributes()));
}
}
OpenPOWER on IntegriCloud