about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorThe Miri Conjob Bot <miri@cron.bot>2023-12-12 05:10:45 +0000
committerThe Miri Conjob Bot <miri@cron.bot>2023-12-12 05:10:45 +0000
commitdd6008999e524a5a073f0d49191809e952276427 (patch)
treef46f2a09139374b9160661d259f0b71112f90184 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent86e64161e3bde2b41356a59569a200ab1709126b (diff)
parent19e0c984d3ff44c6e273ddae2f327e8ad8726fae (diff)
Merge from rustc
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
index 55e1c84c8a2..2601d96b8c8 100644
--- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
@@ -841,7 +841,11 @@ LLVMRustOptimize(
         // cargo run tests in multhreading mode by default
         // so use atomics for coverage counters
         Options.Atomic = true;
+#if LLVM_VERSION_GE(18, 0)
+        MPM.addPass(InstrProfilingLoweringPass(Options, false));
+#else
         MPM.addPass(InstrProfiling(Options, false));
+#endif
       }
     );
   }