diff options
Diffstat (limited to 'lib/VMCore/BasicBlock.cpp')
-rw-r--r-- | lib/VMCore/BasicBlock.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp index 32c86c4ce6..2e8560cb65 100644 --- a/lib/VMCore/BasicBlock.cpp +++ b/lib/VMCore/BasicBlock.cpp @@ -105,6 +105,15 @@ void BasicBlock::setName(const std::string &name, SymbolTable *ST) { if (P && hasName()) P->getSymbolTable().insert(this); } +void BasicBlock::removeFromParent() { + getParent()->getBasicBlockList().remove(this); +} + +void BasicBlock::eraseFromParent() { + getParent()->getBasicBlockList().erase(this); +} + + TerminatorInst *BasicBlock::getTerminator() { if (InstList.empty()) return 0; return dyn_cast<TerminatorInst>(&InstList.back()); |