[PATCH] D71092: [VFS] More consistent support for Windows
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 31 14:07:40 PST 2020
rnk added a comment.
I was worried there would be more duplication. :) As far as rebuilding the wheel square goes, this seems totally reasonable. I had a question and a nit, though.
================
Comment at: llvm/lib/Support/VirtualFileSystem.cpp:1111-1113
+ sys::path::Style style = sys::path::Style::posix;
+ if (sys::path::is_absolute(WorkingDir.get(), sys::path::Style::windows)) {
+ style = sys::path::Style::posix;
----------------
It looks like you assign posix style if the working directory has windows path style. Is that what you meant to do?
================
Comment at: llvm/lib/Support/VirtualFileSystem.cpp:1117
+ std::string Result = WorkingDir.get();
+ if (Result.empty() || Result.back() != sys::path::get_separator(style)[0]) {
+ Result += sys::path::get_separator(style);
----------------
`Result.endswith(sys::path::get_separator(style))` saves a boolean condition
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71092/new/
https://reviews.llvm.org/D71092
More information about the cfe-commits
mailing list