This revision was automatically updated to reflect the committed changes.
Closed by commit rG122e7af03df6: PCH debug info: Avoid appending the source
directory to an absolute path (authored by aprantl).
Herald added a project: clang.
Changed prior to commit:
https://reviews.llvm.org/D69213?vs=2
aprantl marked an inline comment as done.
aprantl added inline comments.
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:541
+MainFileDir = MainFile->getDir()->getName();
+if (MainFileDir != "." && !llvm::sys::path::is_absolute(MainFileName)) {
llvm::SmallString<1024
JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.
LGTM modulo the comment.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69213/new/
https://reviews.llvm.org/D69213
___
cfe-co
JDevlieghere added inline comments.
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:541
+MainFileDir = MainFile->getDir()->getName();
+if (MainFileDir != "." && !llvm::sys::path::is_absolute(MainFileName)) {
llvm::SmallString<1024> MainFileDirSS(MainFileDir);
---
aprantl created this revision.
aprantl added reviewers: JDevlieghere, davide.
aprantl added a project: debug-info.
When building a precompiled header in `-fmodule-format=obj` (i.e., `-gmodules)
in an absolute path, the locig in CGDebugInfo::createCompileUnit would
unconditionally append the sour