summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/BasicBlock.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-11 22:21:39 +0000
committerChris Lattner <sabre@nondot.org>2004-10-11 22:21:39 +0000
commit02a71e7748355f393720189a7d4bc0b8f49c298e (patch)
tree701cea690c3decfd647dfacdbf16f1bf4c7ef014 /llvm/lib/VMCore/BasicBlock.cpp
parent273207f32fce802474209020a7b048f38e8c29d6 (diff)
downloadbcm5719-llvm-02a71e7748355f393720189a7d4bc0b8f49c298e.tar.gz
bcm5719-llvm-02a71e7748355f393720189a7d4bc0b8f49c298e.zip
Implement remove/eraseFromParent methods
llvm-svn: 16922
Diffstat (limited to 'llvm/lib/VMCore/BasicBlock.cpp')
-rw-r--r--llvm/lib/VMCore/BasicBlock.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/BasicBlock.cpp b/llvm/lib/VMCore/BasicBlock.cpp
index 32c86c4ce69..2e8560cb657 100644
--- a/llvm/lib/VMCore/BasicBlock.cpp
+++ b/llvm/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());
OpenPOWER on IntegriCloud