LLVM
15.0.0git
|
FileCheck class takes the request and exposes various methods that use information from the request. More...
#include "llvm/FileCheck/FileCheck.h"
Public Member Functions | |
FileCheck (FileCheckRequest Req) | |
~FileCheck () | |
Regex | buildCheckPrefixRegex () |
bool | readCheckFile (SourceMgr &SM, StringRef Buffer, Regex &PrefixRE, std::pair< unsigned, unsigned > *ImpPatBufferIDRange=nullptr) |
Reads the check file from Buffer and records the expected strings it contains. More... | |
bool | ValidateCheckPrefixes () |
StringRef | CanonicalizeFile (MemoryBuffer &MB, SmallVectorImpl< char > &OutputBuffer) |
Canonicalizes whitespaces in the file. More... | |
bool | checkInput (SourceMgr &SM, StringRef Buffer, std::vector< FileCheckDiag > *Diags=nullptr) |
Checks the input to FileCheck provided in the Buffer against the expected strings read from the check file and record diagnostics emitted in Diags . More... | |
FileCheck class takes the request and exposes various methods that use information from the request.
Definition at line 180 of file FileCheck.h.
|
explicit |
llvm::FileCheck::~FileCheck | ( | ) |
Regex llvm::FileCheck::buildCheckPrefixRegex | ( | ) |
StringRef llvm::FileCheck::CanonicalizeFile | ( | MemoryBuffer & | MB, |
SmallVectorImpl< char > & | OutputBuffer | ||
) |
Canonicalizes whitespaces in the file.
Line endings are replaced with UNIX-style '
'.
bool llvm::FileCheck::checkInput | ( | SourceMgr & | SM, |
StringRef | Buffer, | ||
std::vector< FileCheckDiag > * | Diags = nullptr |
||
) |
Checks the input to FileCheck provided in the Buffer
against the expected strings read from the check file and record diagnostics emitted in Diags
.
Errors are recorded against SM
.
bool llvm::FileCheck::readCheckFile | ( | SourceMgr & | SM, |
StringRef | Buffer, | ||
Regex & | PrefixRE, | ||
std::pair< unsigned, unsigned > * | ImpPatBufferIDRange = nullptr |
||
) |
Reads the check file from Buffer
and records the expected strings it contains.
Errors are reported against SM
.
Only expected strings whose prefix is one of those listed in PrefixRE
are recorded.
If ImpPatBufferIDRange
, then the range (inclusive start, exclusive end) of IDs for source buffers added to SM
for implicit patterns are recorded in it. The range is empty if there are none.
bool llvm::FileCheck::ValidateCheckPrefixes | ( | ) |