[all-commits] [llvm/llvm-project] a23a59: [clang] Fix absolute file paths with -fdebug-prefi...
Keith Smiley via All-commits
all-commits at lists.llvm.org
Fri Oct 8 10:35:38 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a23a5967932292b82e9a7e4b37817d1b3f5be5ec
https://github.com/llvm/llvm-project/commit/a23a5967932292b82e9a7e4b37817d1b3f5be5ec
Author: Keith Smiley <keithbsmiley at gmail.com>
Date: 2021-10-08 (Fri, 08 Oct 2021)
Changed paths:
M clang/lib/CodeGen/CGDebugInfo.cpp
A clang/test/CodeGen/relative-debug-prefix-map.c
Log Message:
-----------
[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
More information about the All-commits
mailing list