Right, fix the problem with invoke instructions, not just call instructions
[oota-llvm.git] / lib / AsmParser / llvmAsmParser.y
index 357c9ae0ea835a5a643108a839d6b5c63194e44c..49bf67fc038ac69a9ee3f3567887156e51cc794f 100644 (file)
@@ -1626,7 +1626,6 @@ BBTerminatorInst : RET ResolvedVal {              // Return with a result...
       Ty = FunctionType::get($2->get(), ParamTypes, isVarArg);
       PFTy = PointerType::get(Ty);
     }
-    delete $2;
 
     Value *V = getVal(PFTy, $3);   // Get the function we're calling...
 
@@ -1657,6 +1656,7 @@ BBTerminatorInst : RET ResolvedVal {              // Return with a result...
 
       $$ = new InvokeInst(V, Normal, Except, *$5);
     }
+    delete $2;
     delete $5;
   }
   | UNWIND {