rust/compiler/rustc_codegen_llvm/src
许杰友 Jieyou Xu (Joe) c26280a8ba
Rollup merge of #132124 - Zalathar:consolidate-covstar, r=jieyouxu
coverage: Consolidate creation of covmap/covfun records

This code for creating covmap/covfun records during codegen was split across multiple functions and files for dubious historical reasons. Having it all in one place makes it easier to follow.

This PR also includes two semi-related cleanups:
- Getting the codegen context's `coverage_cx` state is made infallible, since it should always exist when running the code paths that need it.
- The value of `covfun_section_name` is saved in the codegen context, since it never changes at runtime, and the code that needs it has access to the context anyway.

---

Background: Coverage instrumentation generates two kinds of metadata that are embedded in the final binary. There is per-CGU information that goes in the `__llvm_covmap` linker section, and per-function information that goes in the `__llvm_covfun` section (except on Windows, where slightly different section names are used).
2024-10-26 22:01:12 +08:00
..
back Use &raw in the compiler 2024-09-26 20:33:26 -07:00
coverageinfo Rollup merge of #132124 - Zalathar:consolidate-covstar, r=jieyouxu 2024-10-26 22:01:12 +08:00
debuginfo Effects cleanup 2024-10-26 10:19:07 +08:00
llvm coverage: Emit MC/DC intrinsics using the normal helper method 2024-10-25 14:01:36 +11:00
abi.rs compiler: Factor rustc_target::abi out of cg_llvm 2024-10-08 18:24:56 -07:00
allocator.rs Replace -Z default-hidden-visibility with -Z default-visibility 2024-10-01 22:32:13 +10:00
asm.rs Fix AArch64InlineAsmReg::emit 2024-10-14 06:04:07 +09:00
attributes.rs codegen_ssa: consolidate tied feature checking 2024-09-24 15:48:49 +01:00
base.rs Add warn(unreachable_pub) to rustc_codegen_llvm. 2024-08-16 08:46:57 +10:00
builder.rs coverage: SSA doesn't need to know about instrprof_increment 2024-10-25 14:24:05 +11:00
callee.rs Effects cleanup 2024-10-26 10:19:07 +08:00
common.rs LLVMConstInt only allows integer types 2024-10-12 23:02:15 +08:00
consts.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
context.rs Rollup merge of #132124 - Zalathar:consolidate-covstar, r=jieyouxu 2024-10-26 22:01:12 +08:00
declare.rs Use Default visibility for rustc-generated C symbol declarations 2024-10-11 08:43:27 +11:00
errors.rs codegen_ssa: consolidate tied feature checking 2024-09-24 15:48:49 +01:00
intrinsic.rs Auto merge of #130950 - compiler-errors:yeet-eval, r=BoxyUwU 2024-10-21 03:46:28 +00:00
lib.rs Use &raw in the compiler 2024-09-26 20:33:26 -07:00
llvm_util.rs Rollup merge of #130741 - mrkajetanp:detect-b16b16, r=Amanieu 2024-10-10 22:00:48 +02:00
mono_item.rs cg_llvm: Reuse LLVM-C Comdat support 2024-10-19 10:46:10 -07:00
type_.rs replace some deprecated functions 2024-09-19 09:39:28 +08:00
type_of.rs "innermost", "outermost", "leftmost", and "rightmost" don't need hyphens 2024-10-23 02:45:24 -07:00
va_arg.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
value.rs Add warn(unreachable_pub) to rustc_codegen_llvm. 2024-08-16 08:46:57 +10:00