diff options
author | Chris Lattner <sabre@nondot.org> | 2004-10-11 22:21:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-10-11 22:21:39 +0000 |
commit | 02a71e7748355f393720189a7d4bc0b8f49c298e (patch) | |
tree | 701cea690c3decfd647dfacdbf16f1bf4c7ef014 /llvm/lib/VMCore/Instruction.cpp | |
parent | 273207f32fce802474209020a7b048f38e8c29d6 (diff) | |
download | bcm5719-llvm-02a71e7748355f393720189a7d4bc0b8f49c298e.tar.gz bcm5719-llvm-02a71e7748355f393720189a7d4bc0b8f49c298e.zip |
Implement remove/eraseFromParent methods
llvm-svn: 16922
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) { |