[llvm-commits] [llvm] r81533 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Duncan Sands baldrick at free.fr
Fri Sep 11 10:24:30 PDT 2009


Author: baldrick
Date: Fri Sep 11 12:24:29 2009
New Revision: 81533

URL: http://llvm.org/viewvc/llvm-project?rev=81533&view=rev
Log:
Fix PR4948 (and a leak): by not destroying the DwarfException
object, the timer it creates was not being deleted.  Since the
timer belonged to a static timer group, the timer group would
be destroyed on shutdown, and would notice and complain that
not all timers it contained were destroyed.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=81533&r1=81532&r2=81533&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Fri Sep 11 12:24:29 2009
@@ -51,6 +51,8 @@
 void DwarfWriter::EndModule() {
   DE->EndModule();
   DD->EndModule();
+  delete DD; DD = 0;
+  delete DE; DE = 0;
 }
 
 /// BeginFunction - Gather pre-function debug information.  Assumes being





More information about the llvm-commits mailing list