Remove redundant path join
This commit is contained in:
parent
95fd357d8a
commit
42190bb42e
1 changed files with 4 additions and 7 deletions
|
@ -1055,14 +1055,11 @@ pub fn compile_unit_metadata(
|
||||||
let work_dir = tcx.sess.opts.working_dir.to_string_lossy(FileNameDisplayPreference::Remapped);
|
let work_dir = tcx.sess.opts.working_dir.to_string_lossy(FileNameDisplayPreference::Remapped);
|
||||||
let flags = "\0";
|
let flags = "\0";
|
||||||
let output_filenames = tcx.output_filenames(());
|
let output_filenames = tcx.output_filenames(());
|
||||||
let out_dir = &output_filenames.out_directory;
|
|
||||||
let split_name = if tcx.sess.target_can_use_split_dwarf() {
|
let split_name = if tcx.sess.target_can_use_split_dwarf() {
|
||||||
output_filenames.split_dwarf_path(tcx.sess.split_debuginfo(), Some(codegen_unit_name)).map(
|
output_filenames
|
||||||
|f| {
|
.split_dwarf_path(tcx.sess.split_debuginfo(), Some(codegen_unit_name))
|
||||||
let joined = out_dir.join(f);
|
// We get a path relative to the working directory from split_dwarf_path
|
||||||
tcx.sess.source_map().path_mapping().map_prefix(joined).0
|
.map(|f| tcx.sess.source_map().path_mapping().map_prefix(f).0)
|
||||||
},
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue