summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorzhuyunxing <zhuyunxing.zyx@alibaba-inc.com>2024-06-19 17:49:10 +0800
committerzhuyunxing <zhuyunxing.zyx@alibaba-inc.com>2024-10-08 10:50:18 +0800
commit911ac56e955f52c221660608b9389d8919cdb095 (patch)
tree25025b33959a95c2b704e2acd9016e7ce191b632 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent3ae715c8c63f9aeac47cbf7d8d9dadb3fa32c638 (diff)
downloadrust-911ac56e955f52c221660608b9389d8919cdb095.tar.gz
rust-911ac56e955f52c221660608b9389d8919cdb095.zip
coverage. Disable supporting mcdc on llvm-18
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
index f9fc2bd6da3..8faa5212408 100644
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -1539,23 +1539,21 @@ LLVMRustGetInstrProfIncrementIntrinsic(LLVMModuleRef M) {
 
 extern "C" LLVMValueRef
 LLVMRustGetInstrProfMCDCParametersIntrinsic(LLVMModuleRef M) {
+#if LLVM_VERSION_GE(19, 0)
   return wrap(llvm::Intrinsic::getDeclaration(
       unwrap(M), llvm::Intrinsic::instrprof_mcdc_parameters));
+#else
+  report_fatal_error("LLVM 19.0 is required for mcdc intrinsic functions");
+#endif
 }
 
 extern "C" LLVMValueRef
 LLVMRustGetInstrProfMCDCTVBitmapUpdateIntrinsic(LLVMModuleRef M) {
+#if LLVM_VERSION_GE(19, 0)
   return wrap(llvm::Intrinsic::getDeclaration(
       unwrap(M), llvm::Intrinsic::instrprof_mcdc_tvbitmap_update));
-}
-
-extern "C" LLVMValueRef
-LLVMRustGetInstrProfMCDCCondBitmapIntrinsic(LLVMModuleRef M) {
-#if 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("LLVM 19.0 is required for mcdc intrinsic functions");
 #endif
 }