diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-09-21 18:25:53 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-09-21 18:25:53 +0000 |
| commit | 51ce795c92892d90a6739d64325f11923fd372a4 (patch) | |
| tree | f9fcf948d4282b88de7bf2d196ec0d5d79b46b18 /llvm/lib/CodeGen/DwarfWriter.cpp | |
| parent | 4b2ff02f72986adfcce3b7ac65942d75518abcd2 (diff) | |
| download | bcm5719-llvm-51ce795c92892d90a6739d64325f11923fd372a4.tar.gz bcm5719-llvm-51ce795c92892d90a6739d64325f11923fd372a4.zip | |
don't read Block after it is freed. This fixes PR1684
llvm-svn: 42204
Diffstat (limited to 'llvm/lib/CodeGen/DwarfWriter.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/DwarfWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp index 121ef1d9e87..ed4de7d662b 100644 --- a/llvm/lib/CodeGen/DwarfWriter.cpp +++ b/llvm/lib/CodeGen/DwarfWriter.cpp @@ -1301,7 +1301,9 @@ public: 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); |

