LLVM 20.0.0git
|
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. More...
#include "FileCheck/FileCheckImpl.h"
Public Member Functions | |
Expected< StringRef > | getPatternVarValue (StringRef VarName) |
Error | defineCmdlineVariables (ArrayRef< StringRef > CmdlineDefines, SourceMgr &SM) |
Defines string and numeric variables from definitions given on the command line, passed as a vector of [#]VAR=VAL strings in CmdlineDefines . | |
void | createLineVariable () |
Create @LINE pseudo variable. | |
void | clearLocalVars () |
Undefines local variables (variables whose name does not start with a '$' sign), i.e. | |
Friends | |
class | Pattern |
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.
Definition at line 410 of file FileCheckImpl.h.
void FileCheckPatternContext::clearLocalVars | ( | ) |
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.
Definition at line 2651 of file FileCheck.cpp.
References llvm::SmallVectorTemplateBase< T, bool >::push_back().
void FileCheckPatternContext::createLineVariable | ( | ) |
Create @LINE pseudo variable.
Value is set when pattern are being matched.
Definition at line 1760 of file FileCheck.cpp.
References assert(), and llvm::ExpressionFormat::Unsigned.
Error FileCheckPatternContext::defineCmdlineVariables | ( | ArrayRef< StringRef > | CmdlineDefines, |
SourceMgr & | SM | ||
) |
Defines string and numeric variables from definitions given on the command line, passed as a vector of [#]VAR=VAL strings in CmdlineDefines
.
SM
for all definition parsing failures, if any, or Success otherwise. Definition at line 2513 of file FileCheck.cpp.
References llvm::SourceMgr::AddNewSourceBuffer(), assert(), llvm::ArrayRef< T >::empty(), llvm::StringRef::empty(), llvm::ExpressionAST::eval(), llvm::ErrorDiagnostic::get(), llvm::Expression::getAST(), llvm::MemoryBuffer::getMemBufferCopy(), I, llvm::joinErrors(), Name, llvm::StringRef::npos, llvm::Pattern::parseNumericSubstitutionBlock(), llvm::Pattern::parseVariable(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::StringRef::split(), llvm::StringRef::substr(), llvm::Error::success(), and llvm::Expected< T >::takeError().
VarName
or an error if no such variable has been defined. Definition at line 1360 of file FileCheck.cpp.
Referenced by llvm::StringSubstitution::getResult().
|
friend |
Definition at line 411 of file FileCheckImpl.h.