LLVM 22.0.0git
Public Member Functions | List of all members
llvm::FileCheck Class Reference

FileCheck class takes the request and exposes various methods that use information from the request. More...

#include "llvm/FileCheck/FileCheck.h"

Public Member Functions

LLVM_ABI FileCheck (FileCheckRequest Req)
 
LLVM_ABI ~FileCheck ()
 
LLVM_ABI bool readCheckFile (SourceMgr &SM, StringRef Buffer, std::pair< unsigned, unsigned > *ImpPatBufferIDRange=nullptr)
 Reads the check file from Buffer and records the expected strings it contains.
 
LLVM_ABI bool ValidateCheckPrefixes ()
 
LLVM_ABI StringRef CanonicalizeFile (MemoryBuffer &MB, SmallVectorImpl< char > &OutputBuffer)
 Canonicalizes whitespaces in the file.
 
LLVM_ABI 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.
 

Detailed Description

FileCheck class takes the request and exposes various methods that use information from the request.

Definition at line 182 of file FileCheck.h.

Constructor & Destructor Documentation

◆ FileCheck()

FileCheck::FileCheck ( FileCheckRequest  Req)
explicit

Definition at line 1812 of file FileCheck.cpp.

◆ ~FileCheck()

FileCheck::~FileCheck ( )
default

Member Function Documentation

◆ CanonicalizeFile()

StringRef FileCheck::CanonicalizeFile ( MemoryBuffer MB,
SmallVectorImpl< char > &  OutputBuffer 
)

◆ checkInput()

bool 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.

Returns
false if the input fails to satisfy the checks.

Definition at line 2714 of file FileCheck.cpp.

References llvm::FileCheckString::Check(), llvm::Check::CheckLabel, llvm::FileCheckRequest::EnableVarScope, llvm::Pattern::getCheckTy(), llvm::StringRef::npos, llvm::FileCheckString::Pat, and llvm::StringRef::substr().

◆ readCheckFile()

bool FileCheck::readCheckFile ( SourceMgr SM,
StringRef  Buffer,
std::pair< unsigned, unsigned > *  ImpPatBufferIDRange = nullptr 
)

◆ ValidateCheckPrefixes()

bool FileCheck::ValidateCheckPrefixes ( )

The documentation for this class was generated from the following files: