Skip to content

Commit

Permalink
Use the three-element variant of the 'llvm.gcov' metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-c committed Jun 4, 2017
1 parent 0b0a5ac commit 8b7826f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/librustc_trans/debuginfo/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -811,14 +811,10 @@ pub fn compile_unit_metadata(scc: &SharedCrateContext,
unit_metadata);

let gcov_cu_info = [
// Ideally we would be using the three-element form of !llvm.gcov metadata,
// which allows us to specify gcno/gcda files explicitly, but that's only
// available in LLVM 3.9+; so we rely on LLVM chopping off the extension
// and replacing it with gcno/gcda, instead.
path_to_mdstring(debug_context.llcontext,
&scc.output_filenames().with_extension("gcno")),
// path_to_mdstring(debug_context.llcontext,
// &scc.output_filenames().with_extension("gcda")),
path_to_mdstring(debug_context.llcontext,
&scc.output_filenames().with_extension("gcda")),
cu_desc_metadata,
];
let gcov_metadata = llvm::LLVMMDNodeInContext(debug_context.llcontext,
Expand Down

0 comments on commit 8b7826f

Please sign in to comment.