[PATCH] D111880: [Support] [Windows] Convert paths to the preferred form
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 2 10:29:18 PDT 2021
mstorsjo added inline comments.
================
Comment at: llvm/lib/Support/Windows/Path.inc:79-80
+ // back to backslashes here.
+ const char *const LongPathPrefixSlash = "//?/";
+ if (Path8Str.startswith(LongPathPrefixSlash))
+ llvm::sys::path::native(Path8Str, path::Style::windows_backslash);
----------------
aaron.ballman wrote:
> I'm assuming we purposefully don't care about complete nonsense like `\/?\` not getting normalized into `\\?\`?
>
> We should add tests for both `//?/` and the nonsense form.
Thanks for the suggested edit, yeah that's nicer.
I added a test for `//?/` in llvm/unittests/Support/Path.cpp, lines 2296-2305, but I guess we could add a test for the nonsense form to clarify that case too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111880/new/
https://reviews.llvm.org/D111880
More information about the llvm-commits
mailing list