diff options
Diffstat (limited to 'llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index b1e76ea62f8..88d22570f82 100644 --- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -1480,8 +1480,9 @@ makeStatepointExplicitImpl(const CallSite CS, /* to replace */ // calls to @llvm.experimental.deoptimize with different argument types in // the same module. This is fine -- we assume the frontend knew what it // was doing when generating this kind of IR. - CallTarget = - F->getParent()->getOrInsertFunction("__llvm_deoptimize", FTy); + CallTarget = F->getParent() + ->getOrInsertFunction("__llvm_deoptimize", FTy) + .getCallee(); IsDeoptimize = true; } @@ -1900,8 +1901,8 @@ static void insertUseHolderAfter(CallSite &CS, const ArrayRef<Value *> Values, Module *M = CS.getInstruction()->getModule(); // Use a dummy vararg function to actually hold the values live - Function *Func = cast<Function>(M->getOrInsertFunction( - "__tmp_use", FunctionType::get(Type::getVoidTy(M->getContext()), true))); + FunctionCallee Func = M->getOrInsertFunction( + "__tmp_use", FunctionType::get(Type::getVoidTy(M->getContext()), true)); if (CS.isCall()) { // For call safepoints insert dummy calls right after safepoint Holders.push_back(CallInst::Create(Func, Values, "", |