LLVM 22.0.0git
llvm::NumericVariableUse Class Reference

Class representing the use of a numeric variable in the AST of an expression. More...

#include "FileCheck/FileCheckImpl.h"

Inheritance diagram for llvm::NumericVariableUse:
[legend]

Public Member Functions

 NumericVariableUse (StringRef Name, NumericVariable *Variable)
Expected< APInteval () const override
Expected< ExpressionFormatgetImplicitFormat (const SourceMgr &SM) const override
Public Member Functions inherited from llvm::ExpressionAST
 ExpressionAST (StringRef ExpressionStr)
virtual ~ExpressionAST ()=default
StringRef getExpressionStr () const

Detailed Description

Class representing the use of a numeric variable in the AST of an expression.

Definition at line 286 of file FileCheckImpl.h.

Constructor & Destructor Documentation

◆ NumericVariableUse()

llvm::NumericVariableUse::NumericVariableUse ( StringRef Name,
NumericVariable * Variable )
inline

Definition at line 292 of file FileCheckImpl.h.

References llvm::ExpressionAST::ExpressionAST().

Member Function Documentation

◆ eval()

Expected< APInt > NumericVariableUse::eval ( ) const
overridevirtual
Returns
the value of the variable referenced by this instance.

Implements llvm::ExpressionAST.

Definition at line 194 of file FileCheck.cpp.

References llvm::ExpressionAST::getExpressionStr(), and llvm::make_error().

◆ getImplicitFormat()

Expected< ExpressionFormat > llvm::NumericVariableUse::getImplicitFormat ( const SourceMgr & SM) const
inlineoverridevirtual
Returns
implicit format of this numeric variable.

Reimplemented from llvm::ExpressionAST.

Definition at line 299 of file FileCheckImpl.h.


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