diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index 82568ed4ae177..c9814beedd660 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -1610,7 +1610,7 @@ extern "C" void LLVMRustPositionBefore(LLVMBuilderRef B, LLVMValueRef Instr) { extern "C" void LLVMRustPositionAfter(LLVMBuilderRef B, LLVMValueRef Instr) { if (auto I = dyn_cast(unwrap(Instr))) { - auto J = I->getNextNonDebugInstruction(); + auto J = I->getNextNode(); unwrap(B)->SetInsertPoint(J); } }