Don't append the working directory to absolute paths
authorAdrian Prantl <aprantl@apple.com>
Fri, 25 Feb 2022 19:38:16 +0000 (11:38 -0800)
committerAdrian Prantl <aprantl@apple.com>
Fri, 25 Feb 2022 21:03:59 +0000 (13:03 -0800)
commit2cd9a86da54f8be4eb2aff3e766b125cbdeb023f
tree5cc29dba73cb5952514c16f35cbba7ad8985358e
parentc05da55bdf54e530a888acf8d2282964e25d2507
Don't append the working directory to absolute paths

This fixes a bug that happens when using -fdebug-prefix-map to remap
an absolute path to a relative path. Since the path was absolute
before remapping, it is safe to assume that concatenating the remapped
working directory would be wrong.

Differential Revision: https://reviews.llvm.org/D113718
clang/lib/CodeGen/CGDebugInfo.cpp
clang/test/CodeGen/debug-prefix-map.c