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

Chris Lattner sabre at nondot.org
Fri Sep 21 11:25:53 PDT 2007


Author: lattner
Date: Fri Sep 21 13:25:53 2007
New Revision: 42204

URL: http://llvm.org/viewvc/llvm-project?rev=42204&view=rev
Log:
don't read Block after it is freed.  This fixes PR1684

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

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

==============================================================================
--- llvm/trunk/lib/CodeGen/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/DwarfWriter.cpp Fri Sep 21 13:25:53 2007
@@ -1301,7 +1301,9 @@
       ValuesSet.InsertNode(Value, Where);
       Values.push_back(Value);
     } else {
+      // Already exists, reuse the previous one.
       delete Block;
+      Block = cast<DIEBlock>(Value);
     }
   
     Die->AddValue(Attribute, Block->BestForm(), Value);





More information about the llvm-commits mailing list