[PATCH] D80168: For --relativenames, handle dwarf absolute include directories similarly to compilation directories.
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 21 09:09:10 PDT 2020
aprantl added inline comments.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp:1236
+ // be an absolute path itself, similar to the compilation directory. Handle an
+ // absolute-path include direcctory the same as an absolute-path compilation
+ // directory.
----------------
`directory`
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp:1239
+ if (Kind == FileLineInfoKind::RelativeFilePath && !IncludeDir.empty() &&
+ isPathAbsoluteOnWindowsOrPosix(IncludeDir)) {
+ Result = std::string(llvm::sys::path::filename(FileName));
----------------
Is `!IncludeDir.empty()` implied by `isPathAbsoluteOnWindowsOrPosix(IncludeDir)`?
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp:1240
+ isPathAbsoluteOnWindowsOrPosix(IncludeDir)) {
+ Result = std::string(llvm::sys::path::filename(FileName));
+ return true;
----------------
It's not obvious to me how returning FileName is the right thing here as I'm unfamiliar with this code. Can you explain the mechanism a little?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80168/new/
https://reviews.llvm.org/D80168
More information about the llvm-commits
mailing list