aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);