Don't delete things before their last use (avoids bad reads).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2007-03-20 17:18:33 +00:00
parent 8334b9fa3b
commit 810cce8434

View File

@ -1302,7 +1302,6 @@ Types
Attrs.push_back($5);
for (TypeWithAttrsList::iterator I=$3->begin(), E=$3->end(); I != E; ++I) {
const Type *Ty = I->Ty->get();
delete I->Ty; I->Ty = 0;
Params.push_back(Ty);
if (Ty != Type::VoidTy)
Attrs.push_back(I->Attrs);
@ -1322,7 +1321,6 @@ Types
Attrs.push_back($5);
for (TypeWithAttrsList::iterator I=$3->begin(), E=$3->end(); I != E; ++I) {
const Type* Ty = I->Ty->get();
delete I->Ty; I->Ty = 0;
Params.push_back(Ty);
if (Ty != Type::VoidTy)
Attrs.push_back(I->Attrs);