For generated assembly debug info, MCDwarfLineTableHeader::CompilationDir is an
unmapped path set in MCContext::setGenDwarfRootFile. Remap it.
A relative destination path of -fdebug-prefix-map= exposes a llvm-dwarfdump bug
which joins directories[0] into DW_AT_comp_dir.
I'm not sure this comment is correct (perhaps there's a bug in llvm-dwarfdump if both include_directories[0] and DW_AT_comp_dir are both being joined together). From the DWARFv5 spec:
So maybe llvm-dwarfdump is incorrectly joining DW_AT_comp_dir to include_directories[0]?
I'm not sure the suggestion that -fdebug-prefix-map= is meant to be absolute is the case in practice - I think Chromium folks implemented it so they could have relative debug info that could be built on a build farm and shared between multiple developers with different source tree locations. So I /think/ it's probably usually relative (the same as Google's use of -fdebug-compilation-dir=/proc/self/cwd (which, is, admittedly, technically, an absolute path - but I don't think that's the case for Chromium)... huh, maybe chromium doesn't use prefix map anymore? https://chromium.googlesource.com/chromium/src/+/71df8872b86b4d8260230742cfd3b2e4756f62b5%5E%21/#F0 )