diff options
| author | The Miri Conjob Bot <miri@cron.bot> | 2023-12-12 05:10:45 +0000 |
|---|---|---|
| committer | The Miri Conjob Bot <miri@cron.bot> | 2023-12-12 05:10:45 +0000 |
| commit | dd6008999e524a5a073f0d49191809e952276427 (patch) | |
| tree | f46f2a09139374b9160661d259f0b71112f90184 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 86e64161e3bde2b41356a59569a200ab1709126b (diff) | |
| parent | 19e0c984d3ff44c6e273ddae2f327e8ad8726fae (diff) | |
Merge from rustc
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 4 |
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 } ); } |
