Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions llvm/include/llvm/Support/GlobPattern.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ class GlobPattern {
return SubGlobs[0].getPat() == "*";
}

// The following functions are just shortcuts for faster matching. They are
// conservative to simplify implementations.

// Returns plain prefix of the pattern.
StringRef prefix() const { return Pattern.take_front(PrefixSize); }
// Returns plain suffix of the pattern.
StringRef suffix() const { return Pattern.take_back(SuffixSize); }

private:
Expand Down
Loading