aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/ExprTypeConvert.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/ExprTypeConvert.cpp')
-rw-r--r--lib/Transforms/ExprTypeConvert.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/ExprTypeConvert.cpp b/lib/Transforms/ExprTypeConvert.cpp
index a022461d33..4ab4fe5fee 100644
--- a/lib/Transforms/ExprTypeConvert.cpp
+++ b/lib/Transforms/ExprTypeConvert.cpp
@@ -525,6 +525,7 @@ Value *llvm::ConvertExpressionToType(Value *V, const Type *Ty,
Name);
if (cast<CallInst>(I)->isTailCall())
cast<CallInst>(Res)->setTailCall();
+ cast<CallInst>(Res)->setCallingConv(cast<CallInst>(I)->getCallingConv());
VMC.ExprMap[I] = Res;
Res->setOperand(0, ConvertExpressionToType(I->getOperand(0),NewPTy,VMC,TD));
break;
@@ -1218,6 +1219,9 @@ static void ConvertOperandToType(User *U, Value *OldVal, Value *NewVal,
}
Res = new CallInst(Meth, Params, Name);
+ if (cast<CallInst>(I)->isTailCall())
+ cast<CallInst>(Res)->setTailCall();
+ cast<CallInst>(Res)->setCallingConv(cast<CallInst>(I)->getCallingConv());
break;
}
default: