CallInst *CI = CallInst::Create(F, Args.begin(), Args.end(), "", BB);
CI->setTailCall();
+ CI->setCallingConv(F->getCallingConv());
if (NewG->getReturnType() == Type::VoidTy) {
ReturnInst::Create(BB);
} else if (CI->getType() != NewG->getReturnType()) {
G->replaceAllUsesWith(NewG);
G->eraseFromParent();
- // TODO: look at direct callers to G and make them all direct callers to F
- // iff G->hasAddressTaken() is false.
+ // TODO: look at direct callers to G and make them all direct callers to F.
}
static void AliasGToF(Function *F, Function *G) {