Skip to content

Commit 1e1aa46

Browse files
committed
Inline deprecated CallBase::getCalledValue
This function has already been removed on upstream LLVM. Inlining it here fixes a compile issue on `master-next`.
1 parent 4852210 commit 1e1aa46

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/IRGen/GenCall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1615,7 +1615,7 @@ llvm::CallInst *CallEmission::emitCallSite() {
16151615

16161616
// Insert a call to @llvm.coro.prepare.retcon, then bitcast to the right
16171617
// function type.
1618-
auto origCallee = call->getCalledValue();
1618+
auto origCallee = call->getCalledOperand();
16191619
llvm::Value *opaqueCallee = origCallee;
16201620
opaqueCallee =
16211621
IGF.Builder.CreateBitCast(opaqueCallee, IGF.IGM.Int8PtrTy);

lib/LLVMPasses/LLVMMergeFunctions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ bool SwiftMergeFunctions::replaceDirectCallers(Function *Old, Function *New,
10781078
removeEquivalenceClassFromTree(FE);
10791079

10801080
auto *CI = dyn_cast<CallInst>(I);
1081-
if (!CI || CI->getCalledValue() != Old) {
1081+
if (!CI || CI->getCalledOperand() != Old) {
10821082
AllReplaced = false;
10831083
continue;
10841084
}

0 commit comments

Comments
 (0)