diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp b/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp index 5f5dd197b44..a58346c2b1c 100644 --- a/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp +++ b/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp @@ -66,6 +66,7 @@ static void MakeGuardControlFlowExplicit(Function *DeoptIntrinsic, B.CreateRet(DeoptCall); } + DeoptCall->setCallingConv(CI->getCallingConv()); DeoptBlockTerm->eraseFromParent(); } @@ -89,6 +90,7 @@ bool LowerGuardIntrinsic::runOnFunction(Function &F) { auto *DeoptIntrinsic = Intrinsic::getDeclaration( F.getParent(), Intrinsic::experimental_deoptimize, {F.getReturnType()}); + DeoptIntrinsic->setCallingConv(GuardDecl->getCallingConv()); for (auto *CI : ToLower) { MakeGuardControlFlowExplicit(DeoptIntrinsic, CI); |