[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 19:14:08 PDT 2020
phosek added a comment.
So a trivial example is:
#include <string>
int main() {}
When compiled as:
clang++ test.cc -g3 -S -o test.S
I see paths like these in the output:
"/usr/local/google/home/phosek/fuchsia" "prebuilt/third_party/clang/linux-x64/bin/../include/c++/v1/cstddef"
We could go over driver code and make sure we always invoke `sys::path::remove_dots` inside methods like `AddIncludePaths` or `addPathIfExists` (see for example https://github.com/llvm/llvm-project/blob/b3afad046301d8bb1f4471aceaad704b87de3a69/clang/lib/Driver/ToolChains/Gnu.cpp#L2902 which where the `..` in libc++ header path comes from), but maybe it'd be better to do the normalization uniformly when emitting debuginfo metadata?
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