[clang] Fix absolute file paths with -fdebug-prefix-map
Previously if you passed an absolute path to clang, where only part of the path to the file was remapped, it would result in the file's DIFile being stored with a duplicate path, for example: ``` !DIFile(filename: "./ios/Sources/bar.c", directory: "./ios/Sources") ``` This change handles absolute paths, specifically in the case they are remapped to something relative, and uses the dirname for the directory, and basename for the filename. This also adds a test verifying this behavior for more standard uses as well. Differential Revision: https://reviews.llvm.org/D111352
parent
b4498e6b
Please register or sign in to comment