MergeFuncs: Transfer the function parameter attributes to the call site

rdar://21516488

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242558 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Arnold Schwaighofer
2015-07-17 18:59:08 +00:00
parent 6624afccc6
commit beda80e3bb
4 changed files with 25 additions and 2 deletions

View File

@ -1361,6 +1361,7 @@ void MergeFunctions::writeThunk(Function *F, Function *G) {
CallInst *CI = Builder.CreateCall(F, Args);
CI->setTailCall();
CI->setCallingConv(F->getCallingConv());
CI->setAttributes(F->getAttributes());
if (NewG->getReturnType()->isVoidTy()) {
Builder.CreateRetVoid();
} else {