class FileCheckPatternContext
Declaration
class FileCheckPatternContext { /* full declaration omitted */ };
Description
Class holding the Pattern global state, shared by all patterns: tables holding values of variables and whether they are defined or not at any given time in the matching process.
Declared at: llvm/lib/Support/FileCheckImpl.h:244
Method Overview
- public void clearLocalVars()
- public void createLineVariable()
- public llvm::Error defineCmdlineVariables(std::vector<std::string> & CmdlineDefines, llvm::SourceMgr & SM)
- public Expected<llvm::StringRef> getPatternVarValue(llvm::StringRef VarName)
Methods
¶void clearLocalVars()
void clearLocalVars()
Description
Undefines local variables (variables whose name does not start with a '$' sign), i.e. removes them from GlobalVariableTable and from GlobalNumericVariableTable and also clears the value of numeric variables.
Declared at: llvm/lib/Support/FileCheckImpl.h:297
¶void createLineVariable()
void createLineVariable()
Description
Create @LINEpseudo variable. Value is set when pattern are being matched.
Declared at: llvm/lib/Support/FileCheckImpl.h:291
¶llvm::Error defineCmdlineVariables(
std::vector<std::string>& CmdlineDefines,
llvm::SourceMgr& SM)
llvm::Error defineCmdlineVariables(
std::vector<std::string>& CmdlineDefines,
llvm::SourceMgr& SM)
Description
Defines string and numeric variables from definitions given on the command line, passed as a vector of [#]VAR=VAL strings in\p CmdlineDefines.
Declared at: llvm/lib/Support/FileCheckImpl.h:286
Parameters
- std::vector<std::string>& CmdlineDefines
- llvm::SourceMgr& SM
Returns
an error list containing diagnostics against\p SM for all definition parsing failures, if any, or Success otherwise.
¶Expected<llvm::StringRef> getPatternVarValue(
llvm::StringRef VarName)
Expected<llvm::StringRef> getPatternVarValue(
llvm::StringRef VarName)
Declared at: llvm/lib/Support/FileCheckImpl.h:280
Parameters
- llvm::StringRef VarName
Returns
the value of string variable \p VarName or an error if no such variable has been defined.