[PATCH] D111880: [Support] [Windows] Convert paths to the preferred form
Aaron Ballman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 2 11:12:13 PDT 2021
aaron.ballman 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);
----------------
mstorsjo wrote:
> 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.
I don't insist on the nonsense form, but I figured it would help to demonstrate that we explicitly considered the case and don't care to support it.
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