Skip to content

Commit

Permalink
llvm-wrapper: adapt for LLVM 19 API change
Browse files Browse the repository at this point in the history
No functional changes intended.

The instrprof_mcdc_condbitmap_update intrinsic was dropped in LLVM 19:
* llvm/llvm-project@85a7bba
  • Loading branch information
krasimirgg committed Jun 17, 2024
1 parent fd7eefc commit eb50bb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1576,11 +1576,11 @@ extern "C" LLVMValueRef LLVMRustGetInstrProfMCDCTVBitmapUpdateIntrinsic(LLVMModu
}

extern "C" LLVMValueRef LLVMRustGetInstrProfMCDCCondBitmapIntrinsic(LLVMModuleRef M) {
#if LLVM_VERSION_GE(18, 0)
#if LLVM_VERSION_GE(18, 0) && LLVM_VERSION_LT(19, 0)
return wrap(llvm::Intrinsic::getDeclaration(
unwrap(M), llvm::Intrinsic::instrprof_mcdc_condbitmap_update));
#else
report_fatal_error("LLVM 18.0 is required for mcdc intrinsic functions");
report_fatal_error("The instrprof_mcdc_condbitmap_update only exists in LLVM 18");
#endif
}

Expand Down

0 comments on commit eb50bb2

Please sign in to comment.