diff options
Diffstat (limited to 'include/llvm/Instruction.h')
-rw-r--r-- | include/llvm/Instruction.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h index 85f6cdb..8d49870 100644 --- a/include/llvm/Instruction.h +++ b/include/llvm/Instruction.h @@ -57,6 +57,10 @@ public: // Specialize setName to handle symbol table majik... virtual void setName(const std::string &name, SymbolTable *ST = 0); + /// mayWriteToMemory - Return true if this instruction may modify memory. + /// + virtual bool mayWriteToMemory() const { return false; } + /// clone() - Create a copy of 'this' instruction that is identical in all /// ways except the following: /// * The instruction has no parent @@ -76,9 +80,15 @@ public: Instruction *getPrev() { return Prev; } const Instruction *getPrev() const { return Prev; } - /// mayWriteToMemory - Return true if this instruction may modify memory. + /// removeFromParent - This method unlinks 'this' from the containing basic + /// block, but does not delete it. /// - virtual bool mayWriteToMemory() const { return false; } + void removeFromParent(); + + /// eraseFromParent - This method unlinks 'this' from the containing basic + /// block and deletes it. + /// + void eraseFromParent(); // --------------------------------------------------------------------------- /// Subclass classification... getOpcode() returns a member of |