[PATCH] D87657: [DebugInfo] Remove dots from getFilenameByIndex return value

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 18:11:04 PDT 2020


phosek added a comment.

In D87657#2272775 <https://reviews.llvm.org/D87657#2272775>, @dblaikie wrote:

> Got any particular examples of this from LLVM's DWARF output? I suspect this sort of thing might come from/lead to path non-canonicalization which would make the line table bigger than it needs to be, so might be worth fixing there too.

Good question, I ran into this while testing D87656 <https://reviews.llvm.org/D87656> in Fuchsia, for example I saw the following cases in one of our host tools:

  /b/s/w/ir/k/staging/llvm_build/tools/clang/stage2-bins/./lib/clang/12.0.0/include/stddef.h
  ./../../prebuilt/third_party/clang/linux-x64/bin/../include/c++/v1/vector
  ../staging/llvm_build/tools/clang/stage2-bins/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxxabi/../libcxx/include/utility

It's not limited to just host targets, I saw the following in our kernel:

  /usr/local/google/home/phosek/fuchsia/third_party/boringssl/src/crypto/fipsmodule/sha/../digest/../../internal.h
  ./../../zircon/kernel/lib/libc/include/../../../../../third_party/boringssl/src/include/openssl/sha.h
  ./../../prebuilt/third_party/clang/linux-x64/bin/../include/c++/v1/variant

We use `-fdebug-prefix-map` and `-fdebug-compilation-dir` in our build which may be contributing to this issue. I'll try to come up with a minimal reproducer.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87657/new/

https://reviews.llvm.org/D87657



More information about the llvm-commits mailing list