diff options
| author | Jubilee <workingjubilee@gmail.com> | 2024-10-24 23:23:56 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-24 23:23:56 -0700 |
| commit | 7f93af1a1ea4b8532750a56daacb877cc96d26ad (patch) | |
| tree | 1eccc12b6948795871ffcb98ee230ac99a82d508 /compiler/rustc_codegen_llvm/src/context.rs | |
| parent | 3c6d34f4c41afa1481a25559f3f600010494078a (diff) | |
| parent | 8f075145200aef04b36f2e2239f09b796c6ac8b8 (diff) | |
| download | rust-7f93af1a1ea4b8532750a56daacb877cc96d26ad.tar.gz rust-7f93af1a1ea4b8532750a56daacb877cc96d26ad.zip | |
Rollup merge of #132125 - Zalathar:coverage-intrinsics, r=jieyouxu
coverage: Emit LLVM intrinsics using the normal helper method Codegen already has convenient ways to declare and emit LLVM intrinsics, so there's no need for coverage instrumentation to jump through hoops to emit them manually.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index 2f830d6f941..fb845c0087b 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -1099,6 +1099,10 @@ impl<'ll> CodegenCx<'ll, '_> { if self.sess().instrument_coverage() { ifn!("llvm.instrprof.increment", fn(ptr, t_i64, t_i32, t_i32) -> void); + if crate::llvm_util::get_version() >= (19, 0, 0) { + ifn!("llvm.instrprof.mcdc.parameters", fn(ptr, t_i64, t_i32) -> void); + ifn!("llvm.instrprof.mcdc.tvbitmap.update", fn(ptr, t_i64, t_i32, ptr) -> void); + } } ifn!("llvm.type.test", fn(ptr, t_metadata) -> i1); |
