LLVM 20.0.0git
|
Class representing a numeric variable and its associated current value. More...
#include "FileCheck/FileCheckImpl.h"
Public Member Functions | |
NumericVariable (StringRef Name, ExpressionFormat ImplicitFormat, std::optional< size_t > DefLineNumber=std::nullopt) | |
Constructor for a variable Name with implicit format ImplicitFormat defined at line DefLineNumber or defined before input is parsed if DefLineNumber is std::nullopt. | |
StringRef | getName () const |
ExpressionFormat | getImplicitFormat () const |
std::optional< APInt > | getValue () const |
std::optional< StringRef > | getStringValue () const |
void | setValue (APInt NewValue, std::optional< StringRef > NewStrValue=std::nullopt) |
Sets value of this numeric variable to NewValue , and sets the input buffer string from which it was parsed to NewStrValue . | |
void | clearValue () |
Clears value of this numeric variable, regardless of whether it is currently defined or not. | |
std::optional< size_t > | getDefLineNumber () const |
Class representing a numeric variable and its associated current value.
Definition at line 211 of file FileCheckImpl.h.
|
inlineexplicit |
Constructor for a variable Name
with implicit format ImplicitFormat
defined at line DefLineNumber
or defined before input is parsed if DefLineNumber
is std::nullopt.
Definition at line 236 of file FileCheckImpl.h.
|
inline |
Clears value of this numeric variable, regardless of whether it is currently defined or not.
Definition at line 268 of file FileCheckImpl.h.
|
inline |
Definition at line 275 of file FileCheckImpl.h.
|
inline |
Definition at line 245 of file FileCheckImpl.h.
Referenced by llvm::NumericVariableUse::getImplicitFormat(), and llvm::Pattern::match().
|
inline |
Definition at line 242 of file FileCheckImpl.h.
|
inline |
Definition at line 255 of file FileCheckImpl.h.
|
inline |
Definition at line 248 of file FileCheckImpl.h.
Referenced by llvm::NumericVariableUse::eval().
|
inline |
Sets value of this numeric variable to NewValue
, and sets the input buffer string from which it was parsed to NewStrValue
.
See comments on getStringValue for a discussion of when the latter can be std::nullopt.
Definition at line 260 of file FileCheckImpl.h.
Referenced by llvm::Pattern::match().