Assert if deleting BasicBlock before removing it from Function.

llvm-svn: 12983
diff --git a/llvm/lib/VMCore/BasicBlock.cpp b/llvm/lib/VMCore/BasicBlock.cpp
index c24a61e..48aa7cf 100644
--- a/llvm/lib/VMCore/BasicBlock.cpp
+++ b/llvm/lib/VMCore/BasicBlock.cpp
@@ -81,6 +81,7 @@
 
 
 BasicBlock::~BasicBlock() {
+  assert(Parent == 0 && "BasicBlock still linked into the program!");
   dropAllReferences();
   InstList.clear();
 }