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
This commit is contained in:
Chris Lattner 2007-09-21 18:25:53 +00:00
parent f7a4e2a828
commit c369bd7c50

View File

@ -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);