[PATCH] D109030: [LLD][COFF] Clean paths in PDB even when /pdbsourcepath isn't used

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 31 23:14:37 PDT 2021


mstorsjo added a comment.

In D109030#2975835 <https://reviews.llvm.org/D109030#2975835>, @amccarth wrote:

> Having recently tried out `std::filesystem`, I was pleasantly surprised that it was not nearly as terrible as I expected.  :-)   I know it doesn't meet the cross platform needs of LLVM, but maybe we should consider making LLVM's path handling more like it at some point...

I think(?) the LLVM path handling is kinda modelled to be like `std::filesystem`, although there are a number of more or less subtle differences. Adjusting it to be a closer match probably would be good, although it would require fixing up all cases of those subtle changes.

Regarding using `std::filesystem` in LLVM, I'm not offhand entirely sure which cross platform needs it doesn't support. On Windows it can handle paths with both kinds of slashes (and you can export it to either form), but it doesn't support handling paths with backslashes as separators on non-Windows platforms - which I guess can be needed in some cases.

Also regarding using `std::filesystem` in LLVM; libc++ does support `std::filesystem` on Windows these days, but it's problematic to use it in MSVC mode as it requires compiler-rt builtins for handling `__int128`, see https://reviews.llvm.org/D91139#2429595. So until that's resolved, it'd be hard to use it in LLVM itself as it would break self-hosting.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109030



More information about the llvm-commits mailing list