Changes in directory llvm/lib/VMCore:
Value.cpp updated: 1.71 -> 1.72 --- Log message: Fix a nasty memory leak, caused by my revamp of the value symbol table. --- Diffs of the changes: (+5 -0) Value.cpp | 5 +++++ 1 files changed, 5 insertions(+) Index: llvm/lib/VMCore/Value.cpp diff -u llvm/lib/VMCore/Value.cpp:1.71 llvm/lib/VMCore/Value.cpp:1.72 --- llvm/lib/VMCore/Value.cpp:1.71 Sun Mar 4 18:00:42 2007 +++ llvm/lib/VMCore/Value.cpp Mon Mar 19 19:18:10 2007 @@ -56,6 +56,11 @@ #endif assert(use_begin() == use_end() && "Uses remain when a value is destroyed!"); + // If this value is named, destroy the name. This should not be in a symtab + // at this point. + if (Name) + Name->Destroy(); + // There should be no uses of this object anymore, remove it. LeakDetector::removeGarbageObject(this); } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits