diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2008-10-05 16:49:03 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2008-10-05 16:49:03 +0000 |
commit | d0ad67788d1b9afdda665ee8219f41d3d04c8fe6 (patch) | |
tree | 0d01ba2b15df4255f35553e71c9d4411784fec2c | |
parent | ff4ca2e0883d95cbd97e09e56bee8c73fa384e6a (diff) |
clean ArgTypeListI production: free the PATypeHolder
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57113 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AsmParser/llvmAsmParser.y | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index 608ed721f7..e43c2859db 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -1422,9 +1422,15 @@ Types 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 @@ Types 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 } |