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

postfixing it with a number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54468 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matthijs Kooijman 2008-08-07 16:01:23 +00:00
parent a7bab2c81c
commit 7d942001fa

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);