aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/AddReadAttrs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/IPO/AddReadAttrs.cpp')
-rw-r--r--lib/Transforms/IPO/AddReadAttrs.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/AddReadAttrs.cpp b/lib/Transforms/IPO/AddReadAttrs.cpp
index 4e0677b0d8..897548bad5 100644
--- a/lib/Transforms/IPO/AddReadAttrs.cpp
+++ b/lib/Transforms/IPO/AddReadAttrs.cpp
@@ -105,10 +105,10 @@ bool AddReadAttrs::runOnSCC(const std::vector<CallGraphNode *> &SCC) {
MadeChange = true;
// Clear out any existing attributes.
- F->removeAttribute(0, Attribute::ReadOnly | Attribute::ReadNone);
+ F->removeAttribute(~0, Attribute::ReadOnly | Attribute::ReadNone);
// Add in the new attribute.
- F->addAttribute(0, ReadsMemory ? Attribute::ReadOnly : Attribute::ReadNone);
+ F->addAttribute(~0, ReadsMemory ? Attribute::ReadOnly : Attribute::ReadNone);
if (ReadsMemory)
NumReadOnly++;