LLVM 19.0.0git
Public Member Functions | Public Attributes | List of all members
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 1653 of file FileCheck.cpp.

Constructor & Destructor Documentation

◆ PrefixMatcher()

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

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 1673 of file FileCheck.cpp.

References assert(), llvm::StringRef::data(), llvm::StringRef::find(), From, llvm::Match, llvm::StringRef::npos, llvm::StringRef::size(), and llvm::StringRef::substr().

Referenced by FindFirstMatchingPrefix().

Member Data Documentation

◆ Input

StringRef PrefixMatcher::Input

Definition at line 1656 of file FileCheck.cpp.

◆ Prefixes

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

Prefixes and their first occurrence past the current position.

Definition at line 1655 of file FileCheck.cpp.


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