class FileCheck
Declaration
class FileCheck { /* full declaration omitted */ };
Description
FileCheck class takes the request and exposes various methods that use information from the request.
Declared at: llvm/include/llvm/Support/FileCheck.h:140
Method Overview
- public llvm::StringRef CanonicalizeFile(llvm::MemoryBuffer & MB, SmallVectorImpl<char> & OutputBuffer)
- public FileCheck(llvm::FileCheckRequest Req)
- public bool ValidateCheckPrefixes()
- public llvm::Regex buildCheckPrefixRegex()
- public bool checkInput(llvm::SourceMgr & SM, llvm::StringRef Buffer, std::vector<FileCheckDiag> * Diags = nullptr)
- public bool readCheckFile(llvm::SourceMgr & SM, llvm::StringRef Buffer, llvm::Regex & PrefixRE)
- public ~FileCheck()
Methods
¶llvm::StringRef CanonicalizeFile(
llvm::MemoryBuffer& MB,
SmallVectorImpl<char>& OutputBuffer)
llvm::StringRef CanonicalizeFile(
llvm::MemoryBuffer& MB,
SmallVectorImpl<char>& OutputBuffer)
Description
Canonicalizes whitespaces in the file. Line endings are replaced with UNIX-style '\n'.
Declared at: llvm/include/llvm/Support/FileCheck.h:168
Parameters
- llvm::MemoryBuffer& MB
- SmallVectorImpl<char>& OutputBuffer
¶FileCheck(llvm::FileCheckRequest Req)
FileCheck(llvm::FileCheckRequest Req)
Declared at: llvm/include/llvm/Support/FileCheck.h:147
Parameters
¶bool ValidateCheckPrefixes()
bool ValidateCheckPrefixes()
Declared at: llvm/include/llvm/Support/FileCheck.h:164
¶llvm::Regex buildCheckPrefixRegex()
llvm::Regex buildCheckPrefixRegex()
Declared at: llvm/include/llvm/Support/FileCheck.h:155
¶bool checkInput(
llvm::SourceMgr& SM,
llvm::StringRef Buffer,
std::vector<FileCheckDiag>* Diags = nullptr)
bool checkInput(
llvm::SourceMgr& SM,
llvm::StringRef Buffer,
std::vector<FileCheckDiag>* Diags = nullptr)
Description
Checks the input to FileCheck provided in the \p Buffer against the expected strings read from the check file and record diagnostics emitted in \p Diags. Errors are recorded against \p SM.
Declared at: llvm/include/llvm/Support/FileCheck.h:176
Parameters
- llvm::SourceMgr& SM
- llvm::StringRef Buffer
- std::vector<FileCheckDiag>* Diags = nullptr
Returns
false if the input fails to satisfy the checks.
¶bool readCheckFile(llvm::SourceMgr& SM,
llvm::StringRef Buffer,
llvm::Regex& PrefixRE)
bool readCheckFile(llvm::SourceMgr& SM,
llvm::StringRef Buffer,
llvm::Regex& PrefixRE)
Description
Reads the check file from \p Buffer and records the expected strings it contains. Errors are reported against \p SM. Only expected strings whose prefix is one of those listed in \p PrefixRE are recorded.
Declared at: llvm/include/llvm/Support/FileCheck.h:162
Parameters
- llvm::SourceMgr& SM
- llvm::StringRef Buffer
- llvm::Regex& PrefixRE
Returns
true in case of an error, false otherwise.
¶~FileCheck()
~FileCheck()
Declared at: llvm/include/llvm/Support/FileCheck.h:148