summaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp b/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp
index aea17aa82a88..b9f88ba4e078 100644
--- a/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp
+++ b/llvm/lib/Transforms/Scalar/MakeGuardsExplicit.cpp
@@ -69,7 +69,7 @@ static bool explicifyGuards(Function &F) {
if (GuardIntrinsics.empty())
return false;
- auto *DeoptIntrinsic = Intrinsic::getDeclaration(
+ auto *DeoptIntrinsic = Intrinsic::getOrInsertDeclaration(
F.getParent(), Intrinsic::experimental_deoptimize, {F.getReturnType()});
DeoptIntrinsic->setCallingConv(GuardDecl->getCallingConv());