[PATCH] D87667: [Support/Path] Add path::is_gnu_style_absolute

Vinicius Tinti via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 02:30:27 PDT 2020


tinti added inline comments.


================
Comment at: llvm/lib/Support/Path.cpp:695
+  // Handle '/' which should be true regardless Windows or POSIX.
+  if (!P.empty() && is_separator(P.front(), Style::posix))
+    return true;
----------------
jhenderson wrote:
> tinti wrote:
> > I wanted to even avoid calling `is_separator`.
> > 
> > What do you think?
> If we change this to be `is_separator(P.front(), Style)`, won't that mean we don't need the second check below? I feel very confident that we don't need to worry that `is_separator`'s behaviour will change.
> If we change this to be `is_separator(P.front(), Style)`, won't that mean we don't need the second check below? I feel very confident that we don't need to worry that `is_separator`'s behaviour will change.

Yes. It looks so.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87667



More information about the llvm-commits mailing list