[llvm-commits] [llvm] r57113 - /llvm/trunk/lib/AsmParser/llvmAsmParser.y
Nuno Lopes
nunoplopes at sapo.pt
Sun Oct 5 09:49:04 PDT 2008
Author: nlopes
Date: Sun Oct 5 11:49:03 2008
New Revision: 57113
URL: http://llvm.org/viewvc/llvm-project?rev=57113&view=rev
Log:
clean ArgTypeListI production: free the PATypeHolder
Modified:
llvm/trunk/lib/AsmParser/llvmAsmParser.y
Modified: llvm/trunk/lib/AsmParser/llvmAsmParser.y
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/llvmAsmParser.y?rev=57113&r1=57112&r2=57113&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/llvmAsmParser.y (original)
+++ llvm/trunk/lib/AsmParser/llvmAsmParser.y Sun Oct 5 11:49:03 2008
@@ -1422,9 +1422,15 @@
CHECK_FOR_ERROR
FunctionType *FT = FunctionType::get(RetTy, Params, isVarArg);
- delete $3; // Delete the argument list
delete $1; // Delete the return type handle
$$ = new PATypeHolder(HandleUpRefs(FT));
+
+ // Delete the argument list
+ for (I = $3->begin() ; I != E; ++I ) {
+ delete I->Ty;
+ }
+ delete $3;
+
CHECK_FOR_ERROR
}
| VOID '(' ArgTypeListI ')' OptFuncAttrs {
@@ -1447,8 +1453,14 @@
CHECK_FOR_ERROR
FunctionType *FT = FunctionType::get($1, Params, isVarArg);
- delete $3; // Delete the argument list
$$ = new PATypeHolder(HandleUpRefs(FT));
+
+ // Delete the argument list
+ for (I = $3->begin() ; I != E; ++I ) {
+ delete I->Ty;
+ }
+ delete $3;
+
CHECK_FOR_ERROR
}
More information about the llvm-commits
mailing list