aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Instruction.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Instruction.h')
-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 035687e..fae6d2a 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);