Skip to content

Commit

Permalink
coverage: Add links to LLVM docs for the coverage mapping format
Browse files Browse the repository at this point in the history
  • Loading branch information
Zalathar committed Oct 26, 2024
1 parent 0356908 commit 0d653a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ fn generate_covmap_record<'ll>(
llvm::set_linkage(llglobal, llvm::Linkage::PrivateLinkage);
llvm::set_section(llglobal, &covmap_section_name);
// LLVM's coverage mapping format specifies 8-byte alignment for items in this section.
// <https://llvm.org/docs/CoverageMappingFormat.html>
llvm::set_alignment(llglobal, Align::EIGHT);
cx.add_used_global(llglobal);
}
Expand Down Expand Up @@ -400,6 +401,7 @@ fn generate_covfun_record(
llvm::set_visibility(llglobal, llvm::Visibility::Hidden);
llvm::set_section(llglobal, cx.covfun_section_name());
// LLVM's coverage mapping format specifies 8-byte alignment for items in this section.
// <https://llvm.org/docs/CoverageMappingFormat.html>
llvm::set_alignment(llglobal, Align::EIGHT);
if cx.target_spec().supports_comdat() {
llvm::set_comdat(cx.llmod, llglobal, &func_record_var_name);
Expand Down

0 comments on commit 0d653a5

Please sign in to comment.