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 | c369bd7c503dd748ae1697858f13291bfda6ed80 (patch) | |
tree | e77ff6f20c7e0b2352538e1b626df0964a606f18 /lib/CodeGen/DwarfWriter.cpp | |
parent | f7a4e2a8285080f0285465e40828b83c78f8f154 (diff) |
don't read Block after it is freed. This fixes PR1684
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42204 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/DwarfWriter.cpp')
-rw-r--r-- | lib/CodeGen/DwarfWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp index 121ef1d9e8..ed4de7d662 100644 --- a/lib/CodeGen/DwarfWriter.cpp +++ b/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); |