[PATCH] D87468: [Support] Add GlobPattern::isTrivialMatchAll()
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 10:40:35 PDT 2020
MaskRay added a comment.
GlobPattern::matchOne has a fast path for `'*'`. Isn't it fast enough?
================
Comment at: llvm/include/llvm/Support/GlobPattern.h:35
+ // Returns true for glob pattern "*".
+ bool isTrivialMatchAll() const { return Prefix && Prefix->empty(); }
+
----------------
This is not correct (`*foo`). `Suffix` may be non-empty.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87468/new/
https://reviews.llvm.org/D87468
More information about the llvm-commits
mailing list