diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 6fa434cccfa..9a20a2fd0c2 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -2398,7 +2398,7 @@ public: /// @brief Determine if the call does not access memory. bool doesNotAccessMemory() const { - return paramHasAttr(0, Attribute::ReadNone); + return paramHasAttr(~0, Attribute::ReadNone); } void setDoesNotAccessMemory(bool NotAccessMemory = true) { if (NotAccessMemory) addAttribute(~0, Attribute::ReadNone);