Use local and remapped paths where appropriate

This commit is contained in:
Andy Wang 2021-04-19 23:27:02 +01:00
parent fb4f6439f6
commit 5417b45c26
No known key found for this signature in database
GPG key ID: 181B49F9F38F3374
28 changed files with 85 additions and 74 deletions

View file

@ -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 {