diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO/AddReadAttrs.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/AddReadAttrs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/AddReadAttrs.cpp b/llvm/lib/Transforms/IPO/AddReadAttrs.cpp index 4e0677b0d8e..897548bad5b 100644 --- a/llvm/lib/Transforms/IPO/AddReadAttrs.cpp +++ b/llvm/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++; |