LLVM  10.0.0svn
Public Member Functions | List of all members
llvm::FileCheckNumericVariable Class Reference

Class representing a numeric variable and its associated current value. More...

#include "Support/FileCheckImpl.h"

Public Member Functions

 FileCheckNumericVariable (StringRef Name, Optional< size_t > DefLineNumber=None)
 Constructor for a variable Name defined at line DefLineNumber or defined before input is parsed if DefLineNumber is None. More...
 
StringRef getName () const
 
Optional< uint64_t > getValue () const
 
void setValue (uint64_t NewValue)
 Sets value of this numeric variable to NewValue. More...
 
void clearValue ()
 Clears value of this numeric variable, regardless of whether it is currently defined or not. More...
 
Optional< size_tgetDefLineNumber ()
 

Detailed Description

Class representing a numeric variable and its associated current value.

Definition at line 82 of file FileCheckImpl.h.

Constructor & Destructor Documentation

◆ FileCheckNumericVariable()

llvm::FileCheckNumericVariable::FileCheckNumericVariable ( StringRef  Name,
Optional< size_t DefLineNumber = None 
)
inlineexplicit

Constructor for a variable Name defined at line DefLineNumber or defined before input is parsed if DefLineNumber is None.

Definition at line 98 of file FileCheckImpl.h.

Member Function Documentation

◆ clearValue()

void llvm::FileCheckNumericVariable::clearValue ( )
inline

Clears value of this numeric variable, regardless of whether it is currently defined or not.

Definition at line 113 of file FileCheckImpl.h.

References llvm::None.

◆ getDefLineNumber()

Optional<size_t> llvm::FileCheckNumericVariable::getDefLineNumber ( )
inline
Returns
the line number where this variable is defined, if any, or None if defined before input is parsed.

Definition at line 117 of file FileCheckImpl.h.

Referenced by popFront().

◆ getName()

StringRef llvm::FileCheckNumericVariable::getName ( ) const
inline
Returns
name of this numeric variable.

Definition at line 103 of file FileCheckImpl.h.

References Name.

◆ getValue()

Optional<uint64_t> llvm::FileCheckNumericVariable::getValue ( ) const
inline
Returns
this variable's value.

Definition at line 106 of file FileCheckImpl.h.

Referenced by llvm::FileCheckNumericVariableUse::eval().

◆ setValue()

void llvm::FileCheckNumericVariable::setValue ( uint64_t  NewValue)
inline

Sets value of this numeric variable to NewValue.

Definition at line 109 of file FileCheckImpl.h.

Referenced by llvm::FileCheckPattern::match().


The documentation for this class was generated from the following file: