[llvm-commits] [llvm] r48823 - /llvm/branches/ggreif/use-diet/lib/Linker/LinkModules.cpp
Gabor Greif
ggreif at gmail.com
Wed Mar 26 05:58:55 PDT 2008
Author: ggreif
Date: Wed Mar 26 07:58:40 2008
New Revision: 48823
URL: http://llvm.org/viewvc/llvm-project?rev=48823&view=rev
Log:
Create-ify Linker
Modified:
llvm/branches/ggreif/use-diet/lib/Linker/LinkModules.cpp
Modified: llvm/branches/ggreif/use-diet/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/use-diet/lib/Linker/LinkModules.cpp?rev=48823&r1=48822&r2=48823&view=diff
==============================================================================
--- llvm/branches/ggreif/use-diet/lib/Linker/LinkModules.cpp (original)
+++ llvm/branches/ggreif/use-diet/lib/Linker/LinkModules.cpp Wed Mar 26 07:58:40 2008
@@ -822,8 +822,8 @@
// We have a definition of the same name but different type in the
// source module. Copy the prototype to the destination and replace
// uses of the destination's prototype with the new prototype.
- Function *NewDF = new Function(SF->getFunctionType(), SF->getLinkage(),
- SF->getName(), Dest);
+ Function *NewDF = Function::Create(SF->getFunctionType(), SF->getLinkage(),
+ SF->getName(), Dest);
CopyGVAttributes(NewDF, SF);
// Any uses of DF need to change to NewDF, with cast
@@ -858,8 +858,8 @@
} else if (!DF || SF->hasInternalLinkage() || DF->hasInternalLinkage()) {
// Function does not already exist, simply insert an function signature
// identical to SF into the dest module.
- Function *NewDF = new Function(SF->getFunctionType(), SF->getLinkage(),
- SF->getName(), Dest);
+ Function *NewDF = Function::Create(SF->getFunctionType(), SF->getLinkage(),
+ SF->getName(), Dest);
CopyGVAttributes(NewDF, SF);
// If the LLVM runtime renamed the function, but it is an externally
More information about the llvm-commits
mailing list