Skip to content

Commit 099b0ba

Browse files
krasimirggnikic
authored andcommitted
llvm-wrapper: adapt for LLVM 19 API change
No functional changes intended. The instrprof_mcdc_condbitmap_update intrinsic was dropped in LLVM 19: * llvm/llvm-project@85a7bba
1 parent 52c75d0 commit 099b0ba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1562,11 +1562,12 @@ LLVMRustGetInstrProfMCDCTVBitmapUpdateIntrinsic(LLVMModuleRef M) {
15621562

15631563
extern "C" LLVMValueRef
15641564
LLVMRustGetInstrProfMCDCCondBitmapIntrinsic(LLVMModuleRef M) {
1565-
#if LLVM_VERSION_GE(18, 0)
1565+
#if LLVM_VERSION_GE(18, 0) && LLVM_VERSION_LT(19, 0)
15661566
return wrap(llvm::Intrinsic::getDeclaration(
15671567
unwrap(M), llvm::Intrinsic::instrprof_mcdc_condbitmap_update));
15681568
#else
1569-
report_fatal_error("LLVM 18.0 is required for mcdc intrinsic functions");
1569+
report_fatal_error(
1570+
"The instrprof_mcdc_condbitmap_update only exists in LLVM 18");
15701571
#endif
15711572
}
15721573

0 commit comments

Comments
 (0)