about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/coverageinfo
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-19 19:09:29 +0000
committerbors <bors@rust-lang.org>2023-10-19 19:09:29 +0000
commit94c4e5c4111cbefcd098d6efcb0b222b6e512fcb (patch)
tree550103880907fc185bae80be8a49624458319147 /compiler/rustc_codegen_llvm/src/coverageinfo
parente76cb8c49831ff80d7d2e16319c86edbaa9edb8c (diff)
parent5c41de113e8484085fbc01cf6d5a0b16159110a7 (diff)
downloadrust-94c4e5c4111cbefcd098d6efcb0b222b6e512fcb.tar.gz
rust-94c4e5c4111cbefcd098d6efcb0b222b6e512fcb.zip
Auto merge of #115214 - Urgau:rfc-3127-trim-paths, r=compiler-errors
Implement rustc part of RFC 3127 trim-paths

This PR implements (or at least tries to) [RFC 3127 trim-paths](https://github.com/rust-lang/rust/issues/111540), the rustc part. That is `-Zremap-path-scope` with all of it's components/scopes.

`@rustbot` label: +F-trim-paths
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/coverageinfo')
-rw-r--r--compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
index ef3647efd88..411620c9e49 100644
--- a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
+++ b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
@@ -123,9 +123,9 @@ impl GlobalFileTable {
         // Since rustc generates coverage maps with relative paths, the
         // compilation directory can be combined with the relative paths
         // to get absolute paths, if needed.
-        let working_dir = Symbol::intern(
-            &tcx.sess.opts.working_dir.remapped_path_if_available().to_string_lossy(),
-        );
+        use rustc_session::RemapFileNameExt;
+        let working_dir =
+            Symbol::intern(&tcx.sess.opts.working_dir.for_codegen(&tcx.sess).to_string_lossy());
         global_file_table.insert(working_dir);
         Self { global_file_table }
     }