1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Let SRETPromotion properly preserve the function name instead of (implicitly)

postfixing it with a number.

llvm-svn: 54468
This commit is contained in:
Matthijs Kooijman 2008-08-07 16:01:23 +00:00
parent 287cca11b3
commit d62ee008d1

View File

@ -228,7 +228,8 @@ Function *SRETPromotion::cloneFunctionBody(Function *F,
}
FunctionType *NFTy = FunctionType::get(STy, Params, FTy->isVarArg());
Function *NF = Function::Create(NFTy, F->getLinkage(), F->getName());
Function *NF = Function::Create(NFTy, F->getLinkage());
NF->takeName(F);
NF->copyAttributesFrom(F);
NF->setParamAttrs(PAListPtr::get(ParamAttrsVec.begin(), ParamAttrsVec.end()));
F->getParent()->getFunctionList().insert(F, NF);