LLVM  9.0.0svn
Public Member Functions | List of all members
llvm::FileCheckNumExpr Class Reference

Class representing a numeric expression consisting of either a single numeric variable or a binary operation between a numeric variable and an immediate. More...

#include "llvm/Support/FileCheck.h"

Public Member Functions

 FileCheckNumExpr (binop_eval_t EvalBinop, FileCheckNumericVariable *OperandLeft, uint64_t OperandRight)
 
Optional< uint64_t > eval () const
 Evaluates the value of this numeric expression, using EvalBinop to perform the binary operation it consists of. More...
 
StringRef getUndefVarName () const
 

Detailed Description

Class representing a numeric expression consisting of either a single numeric variable or a binary operation between a numeric variable and an immediate.

Definition at line 93 of file FileCheck.h.

Constructor & Destructor Documentation

◆ FileCheckNumExpr()

llvm::FileCheckNumExpr::FileCheckNumExpr ( binop_eval_t  EvalBinop,
FileCheckNumericVariable OperandLeft,
uint64_t  OperandRight 
)
inline

Definition at line 105 of file FileCheck.h.

References eval.

Member Function Documentation

◆ eval()

Optional< uint64_t > FileCheckNumExpr::eval ( ) const

Evaluates the value of this numeric expression, using EvalBinop to perform the binary operation it consists of.

Returns
None if the numeric variable used is undefined, or the expression value otherwise.

Definition at line 41 of file FileCheck.cpp.

References assert(), llvm::Optional< T >::getValue(), and llvm::None.

◆ getUndefVarName()

StringRef FileCheckNumExpr::getUndefVarName ( ) const
Returns
the name of the undefined variable used in this expression if any or an empty string otherwise.

Definition at line 50 of file FileCheck.cpp.


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