commit | 51ce795c92892d90a6739d64325f11923fd372a4 | [log] [tgz] |
---|---|---|
author | Chris Lattner <sabre@nondot.org> | Fri Sep 21 18:25:53 2007 +0000 |
committer | Chris Lattner <sabre@nondot.org> | Fri Sep 21 18:25:53 2007 +0000 |
tree | f9fcf948d4282b88de7bf2d196ec0d5d79b46b18 | |
parent | 4b2ff02f72986adfcce3b7ac65942d75518abcd2 [diff] [blame] |
don't read Block after it is freed. This fixes PR1684 llvm-svn: 42204
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp index 121ef1d..ed4de7d 100644 --- a/llvm/lib/CodeGen/DwarfWriter.cpp +++ b/llvm/lib/CodeGen/DwarfWriter.cpp
@@ -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);