diff options
Diffstat (limited to 'llvm/lib/VMCore/Instruction.cpp')
-rw-r--r-- | llvm/lib/VMCore/Instruction.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Instruction.cpp b/llvm/lib/VMCore/Instruction.cpp index f54acf5f03e..4ea5775330a 100644 --- a/llvm/lib/VMCore/Instruction.cpp +++ b/llvm/lib/VMCore/Instruction.cpp @@ -72,6 +72,13 @@ void Instruction::setName(const std::string &name, SymbolTable *ST) { if (PP && hasName()) PP->getSymbolTable().insert(this); } +void Instruction::removeFromParent() { + getParent()->getInstList().remove(this); +} + +void Instruction::eraseFromParent() { + getParent()->getInstList().erase(this); +} const char *Instruction::getOpcodeName(unsigned OpCode) { switch (OpCode) { |