diff options
author | Gabor Greif <ggreif@gmail.com> | 2008-04-06 20:25:17 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2008-04-06 20:25:17 +0000 |
commit | e9ecc68d8f7cce18cfce7e9806f924fc65aa4281 (patch) | |
tree | 8207de151e5a737ad20754cfb761a885901bb9d3 /llvm/lib/Linker/LinkModules.cpp | |
parent | 5ed17b67d2814be6d7b008b76c91f15a75e5a141 (diff) | |
download | bcm5719-llvm-e9ecc68d8f7cce18cfce7e9806f924fc65aa4281.tar.gz bcm5719-llvm-e9ecc68d8f7cce18cfce7e9806f924fc65aa4281.zip |
API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.
llvm-svn: 49277
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index 32c49903da9..a82b266bbdb 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/lib/Linker/LinkModules.cpp @@ -822,8 +822,8 @@ static bool LinkFunctionProtos(Module *Dest, const Module *Src, // 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 @@ static bool LinkFunctionProtos(Module *Dest, const Module *Src, } 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 |