API changes for class Use size reduction, wave 1.
[oota-llvm.git] / lib / Transforms / IPO / PruneEH.cpp
index 46e11280b0e1d49734c699aa91b9ffce7ac4db27..1b9aefc58205a28e4e869e5f3e40606f0389774d 100644 (file)
@@ -158,8 +158,8 @@ bool PruneEH::SimplifyFunction(Function *F) {
       if (II->doesNotThrow()) {
         SmallVector<Value*, 8> Args(II->op_begin()+3, II->op_end());
         // Insert a call instruction before the invoke.
-        CallInst *Call = new CallInst(II->getCalledValue(),
-                                      Args.begin(), Args.end(), "", II);
+        CallInst *Call = CallInst::Create(II->getCalledValue(),
+                                          Args.begin(), Args.end(), "", II);
         Call->takeName(II);
         Call->setCallingConv(II->getCallingConv());
         Call->setParamAttrs(II->getParamAttrs());
@@ -172,7 +172,7 @@ bool PruneEH::SimplifyFunction(Function *F) {
 
         // Insert a branch to the normal destination right before the
         // invoke.
-        new BranchInst(II->getNormalDest(), II);
+        BranchInst::Create(II->getNormalDest(), II);
 
         // Finally, delete the invoke instruction!
         BB->getInstList().pop_back();