diff options
| author | Andy Wang <cbeuw.andy@gmail.com> | 2021-04-19 23:27:02 +0100 |
|---|---|---|
| committer | Andy Wang <cbeuw.andy@gmail.com> | 2021-05-05 15:31:28 +0100 |
| commit | 5417b45c2676dcd396f007bd89ed0cd55d085768 (patch) | |
| tree | 25a9819f523855d604aa373edb93c850f817532f /compiler/rustc_codegen_cranelift/src | |
| parent | fb4f6439f62d4b940bdfab3f78771d76eacab379 (diff) | |
| download | rust-5417b45c2676dcd396f007bd89ed0cd55d085768.tar.gz rust-5417b45c2676dcd396f007bd89ed0cd55d085768.zip | |
Use local and remapped paths where appropriate
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/common.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/debuginfo/line_info.rs | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_cranelift/src/common.rs b/compiler/rustc_codegen_cranelift/src/common.rs index 92e4435565e..c12d6d0f141 100644 --- a/compiler/rustc_codegen_cranelift/src/common.rs +++ b/compiler/rustc_codegen_cranelift/src/common.rs @@ -334,7 +334,9 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> { let topmost = span.ctxt().outer_expn().expansion_cause().unwrap_or(span); let caller = self.tcx.sess.source_map().lookup_char_pos(topmost.lo()); let const_loc = self.tcx.const_caller_location(( - rustc_span::symbol::Symbol::intern(&caller.file.name.to_string()), + rustc_span::symbol::Symbol::intern( + &caller.file.name.prefer_remapped().to_string_lossy(), + ), caller.line as u32, caller.col_display as u32 + 1, )); diff --git a/compiler/rustc_codegen_cranelift/src/debuginfo/line_info.rs b/compiler/rustc_codegen_cranelift/src/debuginfo/line_info.rs index b3f700bc467..9eb06770630 100644 --- a/compiler/rustc_codegen_cranelift/src/debuginfo/line_info.rs +++ b/compiler/rustc_codegen_cranelift/src/debuginfo/line_info.rs @@ -87,7 +87,7 @@ fn line_program_add_file( filename => { let dir_id = line_program.default_directory(); let dummy_file_name = LineString::new( - filename.to_string().into_bytes(), + filename.prefer_remapped().to_string().into_bytes(), line_program.encoding(), line_strings, ); |
