about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/debuginfo
diff options
context:
space:
mode:
authorAndy Wang <cbeuw.andy@gmail.com>2021-04-19 23:27:02 +0100
committerAndy Wang <cbeuw.andy@gmail.com>2021-05-05 15:31:28 +0100
commit5417b45c2676dcd396f007bd89ed0cd55d085768 (patch)
tree25a9819f523855d604aa373edb93c850f817532f /compiler/rustc_codegen_llvm/src/debuginfo
parentfb4f6439f62d4b940bdfab3f78771d76eacab379 (diff)
downloadrust-5417b45c2676dcd396f007bd89ed0cd55d085768.tar.gz
rust-5417b45c2676dcd396f007bd89ed0cd55d085768.zip
Use local and remapped paths where appropriate
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo')
-rw-r--r--compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
index 6fad1996d7e..1eee1eaa211 100644
--- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
+++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
@@ -759,10 +759,10 @@ fn hex_encode(data: &[u8]) -> String {
 }
 
 pub fn file_metadata(cx: &CodegenCx<'ll, '_>, source_file: &SourceFile) -> &'ll DIFile {
-    debug!("file_metadata: file_name: {}", source_file.name);
+    debug!("file_metadata: file_name: {:?}", source_file.name);
 
     let hash = Some(&source_file.src_hash);
-    let file_name = Some(source_file.name.to_string());
+    let file_name = Some(source_file.name.prefer_remapped().to_string());
     let directory = if source_file.is_real_file() && !source_file.is_imported() {
         Some(cx.sess().working_dir.to_string_lossy(false).to_string())
     } else {