diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2021-08-20 21:13:18 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2021-08-21 10:08:05 +0200 |
| commit | 306259c64595807db0632f0a293bd06bf034f97b (patch) | |
| tree | 757c73de7a527061579740270feca3793c9e1a20 /compiler/rustc_codegen_ssa/src/traits/misc.rs | |
| parent | f3ae726f30401acb1aacf5600f5a2a2883a0c9d4 (diff) | |
| download | rust-306259c64595807db0632f0a293bd06bf034f97b.tar.gz rust-306259c64595807db0632f0a293bd06bf034f97b.zip | |
Always use llvm.used for coverage symbols
This follows what clang does in CoverageMappingGen. Using just llvm.compiler.used is insufficient at least for MSVC targets.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/traits/misc.rs')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/traits/misc.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/traits/misc.rs b/compiler/rustc_codegen_ssa/src/traits/misc.rs index 46f2adbe552..4266e42ec2b 100644 --- a/compiler/rustc_codegen_ssa/src/traits/misc.rs +++ b/compiler/rustc_codegen_ssa/src/traits/misc.rs @@ -16,9 +16,11 @@ pub trait MiscMethods<'tcx>: BackendTypes { fn sess(&self) -> &Session; fn codegen_unit(&self) -> &'tcx CodegenUnit<'tcx>; fn used_statics(&self) -> &RefCell<Vec<Self::Value>>; + fn compiler_used_statics(&self) -> &RefCell<Vec<Self::Value>>; fn set_frame_pointer_type(&self, llfn: Self::Function); fn apply_target_cpu_attr(&self, llfn: Self::Function); fn create_used_variable(&self); + fn create_compiler_used_variable(&self); /// Declares the extern "C" main function for the entry point. Returns None if the symbol already exists. fn declare_c_main(&self, fn_type: Self::Type) -> Option<Self::Function>; } |
