[llvm-commits] CVS: llvm/include/llvm/Instruction.h

Misha Brukman brukman at cs.uiuc.edu
Fri Apr 16 10:47:01 PDT 2004


Changes in directory llvm/include/llvm:

Instruction.h updated: 1.51 -> 1.52

---
Log message:

Assert if Instruction is being deleted before being removed from BasicBlock.


---
Diffs of the changes:  (+4 -0)

Index: llvm/include/llvm/Instruction.h
diff -u llvm/include/llvm/Instruction.h:1.51 llvm/include/llvm/Instruction.h:1.52
--- llvm/include/llvm/Instruction.h:1.51	Sun Feb 29 12:54:23 2004
+++ llvm/include/llvm/Instruction.h	Fri Apr 16 10:46:43 2004
@@ -43,6 +43,10 @@
               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);
   





More information about the llvm-commits mailing list