LLVM 23.0.0git
PrefixMatcher Struct Reference

Public Member Functions

 PrefixMatcher (ArrayRef< StringRef > CheckPrefixes, ArrayRef< StringRef > CommentPrefixes, StringRef Input)
StringRef match (StringRef Buffer)
 Find the next match of a prefix in Buffer.

Public Attributes

SmallVector< std::pair< StringRef, size_t > > Prefixes
 Prefixes and their first occurrence past the current position.
StringRef Input

Detailed Description

Definition at line 1714 of file FileCheck.cpp.

Constructor & Destructor Documentation

◆ PrefixMatcher()

PrefixMatcher::PrefixMatcher ( ArrayRef< StringRef > CheckPrefixes,
ArrayRef< StringRef > CommentPrefixes,
StringRef Input )
inline

Definition at line 1719 of file FileCheck.cpp.

References A(), B(), for(), Input, Prefixes, and llvm::sort().

Member Function Documentation

◆ match()

StringRef PrefixMatcher::match ( StringRef Buffer)
inline

Find the next match of a prefix in Buffer.

Returns empty StringRef if not found.

Definition at line 1734 of file FileCheck.cpp.

References assert(), llvm::StringRef::data(), llvm::StringRef::empty(), Input, llvm::StringRef::npos, Prefixes, and llvm::StringRef::size().

Member Data Documentation

◆ Input

StringRef PrefixMatcher::Input

Definition at line 1717 of file FileCheck.cpp.

Referenced by match(), and PrefixMatcher().

◆ Prefixes

SmallVector<std::pair<StringRef, size_t> > PrefixMatcher::Prefixes

Prefixes and their first occurrence past the current position.

Definition at line 1716 of file FileCheck.cpp.

Referenced by match(), and PrefixMatcher().


The documentation for this struct was generated from the following file: