14 #ifndef LLVM_SUPPORT_FILECHECK_H 15 #define LLVM_SUPPORT_FILECHECK_H 102 std::vector<std::pair<StringRef, unsigned>> VariableUses;
108 std::map<StringRef, unsigned> VariableDefs;
131 std::vector<FileCheckDiag> *Diags)
const;
134 return !(VariableUses.empty() && VariableDefs.empty());
143 void AddBackrefToRegEx(
unsigned BackrefNum);
224 : Pat(P), Prefix(S), Loc(L) {}
233 const std::vector<const FileCheckPattern *> &NotStrings,
236 std::vector<FileCheckDiag> *Diags)
const;
238 std::vector<const FileCheckPattern *> &NotStrings,
241 std::vector<FileCheckDiag> *Diags)
const;
257 Regex buildCheckPrefixRegex();
264 std::vector<FileCheckString> &CheckStrings);
266 bool ValidateCheckPrefixes();
279 std::vector<FileCheckDiag> *Diags =
nullptr);
static bool Check(DecodeStatus &Out, DecodeStatus In)
Represents a range in source code.
Indicates a good match for an expected pattern.
Indicates no match for an excluded pattern.
This class represents lattice values for constants.
std::vector< std::string > ImplicitCheckNot
Indicates a discarded match for an expected pattern.
Marks when parsing found a -NOT check combined with another CHECK suffix.
static Constant * EvaluateExpression(Value *V, const Loop *L, DenseMap< Instruction *, Constant *> &Vals, const DataLayout &DL, const TargetLibraryInfo *TLI)
EvaluateExpression - Given an expression that passes the getConstantEvolvingPHI predicate, evaluate its value assuming the PHI node in the loop has the value PHIVal.
FileCheckType(FileCheckKind Kind=CheckNone)
bool AllowDeprecatedDagOverlap
static LLVM_ATTRIBUTE_ALWAYS_INLINE bool CheckSame(const unsigned char *MatcherTable, unsigned &MatcherIndex, SDValue N, const SmallVectorImpl< std::pair< SDValue, SDNode *>> &RecordedNodes)
CheckSame - Implements OP_CheckSame.
StringRef Prefix
Which prefix name this check matched.
FileCheckPattern Pat
The pattern to match.
bool NoCanonicalizeWhiteSpace
SMLoc Loc
The location in the match file that the check string was specified.
Check::FileCheckType CheckTy
What is the FileCheck directive for this diagnostic?
Indicates a match for an expected pattern, but the match is on the wrong line.
Marks when parsing found a -COUNT directive with invalid count value.
std::vector< std::string > CheckPrefixes
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Contains info about various FileCheck options.
FileCheck(FileCheckRequest Req)
std::vector< std::string > GlobalDefines
A check that we found in the input file.
std::vector< FileCheckPattern > DagNotStrings
All of the strings that are disallowed from occurring between this match string and the previous one ...
unsigned CheckLine
Where is the FileCheck directive for this diagnostic?
SMLoc getLoc() const
Returns the location in source code.
This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling...
Check::FileCheckType getCheckTy() const
Indicates the pattern only matches the end of file.
Indicates a fuzzy match that serves as a suggestion for the next intended match for an expected patte...
Indicates no match for an expected pattern, but this might follow good matches when multiple matches ...
This interface provides simple read-only access to a block of memory, and provides simple methods for...
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
static std::string getDescription(const Module &M)
unsigned InputStartLine
The search range if MatchTy is MatchNoneAndExcluded or MatchNoneButExpected, or the match range other...
Indicates a match for an excluded pattern.
Summary of a FileCheck diagnostic.
LLVM Value Representation.
FileCheckPattern(Check::FileCheckType Ty)
StringRef - Represent a constant reference to a string, i.e.
MatchType
What type of match result does this diagnostic describe?
Represents a location in source code.
FileCheck class takes the request and exposes various methods that use information from the request...
FileCheckString(const FileCheckPattern &P, StringRef S, SMLoc L)