Skip to content

Commit 8b7826f

Browse files
committed
Use the three-element variant of the 'llvm.gcov' metadata
1 parent 0b0a5ac commit 8b7826f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/librustc_trans/debuginfo/metadata.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -811,14 +811,10 @@ pub fn compile_unit_metadata(scc: &SharedCrateContext,
811811
unit_metadata);
812812

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

0 commit comments

Comments
 (0)