X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTransforms%2FUtils%2FCloneModule.cpp;h=e75f915cb9ef5cf1d20e324c6d705d5c023a57c8;hb=051a950000e21935165db56695e35bade668193b;hp=f0ee1e2ae0d17f32084dcdc443f3aace209263b8;hpb=d963ab1f58adb6daa028533ff3285841d7e45f80;p=oota-llvm.git diff --git a/lib/Transforms/Utils/CloneModule.cpp b/lib/Transforms/Utils/CloneModule.cpp index f0ee1e2ae0d..e75f915cb9e 100644 --- a/lib/Transforms/Utils/CloneModule.cpp +++ b/lib/Transforms/Utils/CloneModule.cpp @@ -63,8 +63,8 @@ Module *llvm::CloneModule(const Module *M, // Loop over the functions in the module, making external functions as before for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I) { Function *NF = - new Function(cast(I->getType()->getElementType()), - GlobalValue::ExternalLinkage, I->getName(), New); + Function::Create(cast(I->getType()->getElementType()), + GlobalValue::ExternalLinkage, I->getName(), New); NF->setCallingConv(I->getCallingConv()); NF->setParamAttrs(I->getParamAttrs()); if (I->hasCollector())