diff options
Diffstat (limited to 'include/llvm/Instruction.h')
-rw-r--r-- | include/llvm/Instruction.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h index 2459ef6076..934e890151 100644 --- a/include/llvm/Instruction.h +++ b/include/llvm/Instruction.h @@ -223,6 +223,13 @@ public: /// bool mayReadFromMemory() const; + /// mayReadOrWriteMemory - Return true if this instruction may read or + /// write memory. + /// + bool mayReadOrWriteMemory() const { + return mayReadFromMemory() || mayWriteToMemory(); + } + /// mayThrow - Return true if this instruction may throw an exception. /// bool mayThrow() const; |