[PATCH] D95772: [DebugInfo] Normalize paths by removing unnecessary dots

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 11 10:48:58 PST 2021


phosek added a comment.

In D95772#2534103 <https://reviews.llvm.org/D95772#2534103>, @dblaikie wrote:

> Does this address @rnk's feedback about symlinks? ( https://reviews.llvm.org/D87657#2296028 )

It doesn't, I think if we want to handle that case, we'd need to use `sys::fs::real_path` rather than `sys::path::remove_dots`. That should produce correct result but it's more expensive.

While working on coverage mapping, I've noticed that we already use <https://github.com/llvm/llvm-project/blob/6ef84730157e6beb56c5fbd4b7541dd2f2be72f9/clang/lib/CodeGen/CoverageMappingGen.cpp#L1597> `sys::path::remove_dots` with `remove_dots_dots=true` to normalize filenames there. Whichever way we decide on, I think it'd be useful to unify the two.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95772



More information about the cfe-commits mailing list