From: Misha Brukman Date: Fri, 16 Apr 2004 15:47:21 +0000 (+0000) Subject: Assert if deleting BasicBlock before removing it from Function. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=98eb6264d45a8872431bab7d1dccde0b4b7ca931;p=oota-llvm.git Assert if deleting BasicBlock before removing it from Function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12983 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/BasicBlock.cpp b/lib/VMCore/BasicBlock.cpp index c24a61e4665..48aa7cfe6f2 100644 --- a/lib/VMCore/BasicBlock.cpp +++ b/lib/VMCore/BasicBlock.cpp @@ -81,6 +81,7 @@ BasicBlock::BasicBlock(const std::string &Name, Function *Parent, BasicBlock::~BasicBlock() { + assert(Parent == 0 && "BasicBlock still linked into the program!"); dropAllReferences(); InstList.clear(); }