LLVM  9.0.0svn
Public Member Functions | Public Attributes | List of all members
llvm::FileCheckString Struct Reference

A check that we found in the input file. More...

#include "llvm/Support/FileCheck.h"

Collaboration diagram for llvm::FileCheckString:
Collaboration graph
[legend]

Public Member Functions

 FileCheckString (const FileCheckPattern &P, StringRef S, SMLoc L)
 
size_t Check (const SourceMgr &SM, StringRef Buffer, bool IsLabelScanMode, size_t &MatchLen, FileCheckRequest &Req, std::vector< FileCheckDiag > *Diags) const
 Match check string and its "not strings" and/or "dag strings". More...
 
bool CheckNext (const SourceMgr &SM, StringRef Buffer) const
 Verify there is a single line in the given buffer. More...
 
bool CheckSame (const SourceMgr &SM, StringRef Buffer) const
 Verify there is no newline in the given buffer. More...
 
bool CheckNot (const SourceMgr &SM, StringRef Buffer, const std::vector< const FileCheckPattern *> &NotStrings, const FileCheckRequest &Req, std::vector< FileCheckDiag > *Diags) const
 Verify there's no "not strings" in the given buffer. More...
 
size_t CheckDag (const SourceMgr &SM, StringRef Buffer, std::vector< const FileCheckPattern *> &NotStrings, const FileCheckRequest &Req, std::vector< FileCheckDiag > *Diags) const
 Match "dag strings" and their mixed "not strings". More...
 

Public Attributes

FileCheckPattern Pat
 The pattern to match. More...
 
StringRef Prefix
 Which prefix name this check matched. More...
 
SMLoc Loc
 The location in the match file that the check string was specified. More...
 
std::vector< FileCheckPatternDagNotStrings
 All of the strings that are disallowed from occurring between this match string and the previous one (or start of file). More...
 

Detailed Description

A check that we found in the input file.

Definition at line 240 of file FileCheck.h.

Constructor & Destructor Documentation

◆ FileCheckString()

llvm::FileCheckString::FileCheckString ( const FileCheckPattern P,
StringRef  S,
SMLoc  L 
)
inline

Definition at line 254 of file FileCheck.h.

References Check(), llvm::Check::CheckNext, llvm::Check::CheckNot, and CheckSame().

Member Function Documentation

◆ Check()

size_t FileCheckString::Check ( const SourceMgr SM,
StringRef  Buffer,
bool  IsLabelScanMode,
size_t &  MatchLen,
FileCheckRequest Req,
std::vector< FileCheckDiag > *  Diags 
) const

◆ CheckDag()

size_t FileCheckString::CheckDag ( const SourceMgr SM,
StringRef  Buffer,
std::vector< const FileCheckPattern *> &  NotStrings,
const FileCheckRequest Req,
std::vector< FileCheckDiag > *  Diags 
) const

Match "dag strings" and their mixed "not strings".

Definition at line 1200 of file FileCheck.cpp.

◆ CheckNext()

bool FileCheckString::CheckNext ( const SourceMgr SM,
StringRef  Buffer 
) const

◆ CheckNot()

bool FileCheckString::CheckNot ( const SourceMgr SM,
StringRef  Buffer,
const std::vector< const FileCheckPattern *> &  NotStrings,
const FileCheckRequest Req,
std::vector< FileCheckDiag > *  Diags 
) const

Verify there's no "not strings" in the given buffer.

Definition at line 1173 of file FileCheck.cpp.

References assert(), llvm::Check::CheckNot, llvm::StringRef::npos, llvm::cl::Prefix, PrintMatch(), PrintNoMatch(), and llvm::FileCheckRequest::VerboseVerbose.

◆ CheckSame()

bool FileCheckString::CheckSame ( const SourceMgr SM,
StringRef  Buffer 
) const

Member Data Documentation

◆ DagNotStrings

std::vector<FileCheckPattern> llvm::FileCheckString::DagNotStrings

All of the strings that are disallowed from occurring between this match string and the previous one (or start of file).

Definition at line 252 of file FileCheck.h.

◆ Loc

SMLoc llvm::FileCheckString::Loc

The location in the match file that the check string was specified.

Definition at line 248 of file FileCheck.h.

Referenced by PrintMatch(), and PrintNoMatch().

◆ Pat

FileCheckPattern llvm::FileCheckString::Pat

The pattern to match.

Definition at line 242 of file FileCheck.h.

Referenced by llvm::FileCheck::CheckInput(), PrintMatch(), and PrintNoMatch().

◆ Prefix

StringRef llvm::FileCheckString::Prefix

Which prefix name this check matched.

Definition at line 245 of file FileCheck.h.

Referenced by PrintMatch(), and PrintNoMatch().


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