API changes for class Use size reduction, wave 1.
[oota-llvm.git] / lib / Transforms / Instrumentation / ProfilingUtils.cpp
index 47bfcfcf86490f2f9421f8d31aadf4572a606717..4617fbbd809c319529c2492b6f795b5f281218e4 100644 (file)
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This files implements a few helper functions which are used by profile
+// This file implements a few helper functions which are used by profile
 // instrumentation code to instrument the code.  This allows the profiler pass
 // to worry about *what* to insert, and these functions take care of *how* to do
 // it.
@@ -55,8 +55,8 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName,
   }
   Args[3] = ConstantInt::get(Type::Int32Ty, NumElements);
 
-  Instruction *InitCall = new CallInst(InitFn, Args.begin(), Args.end(),
-                                       "newargc", InsertPos);
+  Instruction *InitCall = CallInst::Create(InitFn, Args.begin(), Args.end(),
+                                           "newargc", InsertPos);
 
   // If argc or argv are not available in main, just pass null values in.
   Function::arg_iterator AI;