13#ifndef LLVM_FILECHECK_FILECHECK_H
14#define LLVM_FILECHECK_FILECHECK_H
85 std::bitset<FileCheckKindModifier::Size> Modifiers;
184 std::unique_ptr<FileCheckPatternContext> PatternContext;
185 std::vector<FileCheckString> CheckStrings;
199 std::pair<unsigned, unsigned> *ImpPatBufferIDRange =
nullptr);
214 std::vector<FileCheckDiag> *Diags =
nullptr);
LLVM_ABI std::string getDescription(StringRef Prefix) const
FileCheckType(FileCheckKind Kind=CheckNone)
FileCheckType & operator=(const FileCheckType &)=default
bool isLiteralMatch() const
LLVM_ABI std::string getModifiersDescription() const
FileCheckType & setLiteralMatch(bool Literal=true)
LLVM_ABI FileCheckType & setCount(int C)
FileCheckType(const FileCheckType &)=default
Class holding the Pattern global state, shared by all patterns: tables holding values of variables an...
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 StringRef CanonicalizeFile(MemoryBuffer &MB, SmallVectorImpl< char > &OutputBuffer)
Canonicalizes whitespaces in the file.
LLVM_ABI FileCheck(FileCheckRequest Req)
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...
LLVM_ABI bool ValidateCheckPrefixes()
This interface provides simple read-only access to a block of memory, and provides simple methods for...
Represents a location in source code.
Represents a range in source code.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling.
StringRef - Represent a constant reference to a string, i.e.
@ C
The default llvm calling convention, compatible with C.
@ ModifierLiteral
Modifies directive to perform literal match.
@ CheckBadNot
Marks when parsing found a -NOT check combined with another CHECK suffix.
@ CheckBadCount
Marks when parsing found a -COUNT directive with invalid count value.
@ CheckEOF
Indicates the pattern only matches the end of file.
This is an optimization pass for GlobalISel generic memory operations.
std::string Note
A note to replace the one normally indicated by MatchTy, or the empty string if none.
enum llvm::FileCheckDiag::MatchType MatchTy
unsigned InputStartLine
The search range if MatchTy starts with MatchNone, or the match range otherwise.
LLVM_ABI FileCheckDiag(const SourceMgr &SM, const Check::FileCheckType &CheckTy, SMLoc CheckLoc, MatchType MatchTy, SMRange InputRange, StringRef Note="")
Check::FileCheckType CheckTy
What is the FileCheck directive for this diagnostic?
MatchType
What type of match result does this diagnostic describe?
@ MatchFoundButWrongLine
Indicates a match for an expected pattern, but the match is on the wrong line.
@ MatchNoneAndExcluded
Indicates no match for an excluded pattern.
@ MatchFoundButExcluded
Indicates a match for an excluded pattern.
@ MatchFuzzy
Indicates a fuzzy match that serves as a suggestion for the next intended match for an expected patte...
@ MatchFoundErrorNote
Indicates an error while processing a match after the match was found for an expected or excluded pat...
@ MatchFoundButDiscarded
Indicates a discarded match for an expected pattern.
@ MatchNoneForInvalidPattern
Indicates no match due to an expected or excluded pattern that has proven to be invalid at match time...
@ MatchFoundAndExpected
Indicates a good match for an expected pattern.
@ MatchNoneButExpected
Indicates no match for an expected pattern, but this might follow good matches when multiple matches ...
SMLoc CheckLoc
Where is the FileCheck directive for this diagnostic?
Contains info about various FileCheck options.
bool IsDefaultCheckPrefix
std::vector< StringRef > GlobalDefines
bool NoCanonicalizeWhiteSpace
std::vector< StringRef > ImplicitCheckNot
std::vector< StringRef > CommentPrefixes
std::vector< StringRef > CheckPrefixes
bool AllowDeprecatedDagOverlap
A check that we found in the input file.