summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2004-04-16 15:46:43 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2004-04-16 15:46:43 +0000
commitbf6059300f49a5a9c582a1cd98d0e394481565e3 (patch)
tree3a55cdb4d620b795b421fe74a3bce478359bd4bf /include
parent265c87a6ef6d2e296ad5bca88edb4985ec0139ba (diff)
downloadllvm-bf6059300f49a5a9c582a1cd98d0e394481565e3.tar.gz
llvm-bf6059300f49a5a9c582a1cd98d0e394481565e3.tar.bz2
llvm-bf6059300f49a5a9c582a1cd98d0e394481565e3.tar.xz
Assert if Instruction is being deleted before being removed from BasicBlock.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Instruction.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h
index 035687e4b8..fae6d2a11a 100644
--- a/include/llvm/Instruction.h
+++ b/include/llvm/Instruction.h
@@ -43,6 +43,10 @@ protected:
Instruction *InsertBefore = 0);
public:
+ ~Instruction() {
+ assert(Parent == 0 && "Instruction still linked in the program!");
+ }
+
// Specialize setName to handle symbol table majik...
virtual void setName(const std::string &name, SymbolTable *ST = 0);