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

Class representing a single binary operation in the AST of an expression. More...

#include "Support/FileCheckImpl.h"

Inheritance diagram for llvm::FileCheckASTBinop:
Inheritance graph
[legend]
Collaboration diagram for llvm::FileCheckASTBinop:
Collaboration graph
[legend]

Public Member Functions

 FileCheckASTBinop (binop_eval_t EvalBinop, std::unique_ptr< FileCheckExpressionAST > LeftOp, std::unique_ptr< FileCheckExpressionAST > RightOp)
 
Expected< uint64_t > eval () const
 Evaluates the value of the binary operation represented by this AST, using EvalBinop on the result of recursively evaluating the operands. More...
 
- Public Member Functions inherited from llvm::FileCheckExpressionAST
virtual ~FileCheckExpressionAST ()=default
 

Detailed Description

Class representing a single binary operation in the AST of an expression.

Definition at line 143 of file FileCheckImpl.h.

Constructor & Destructor Documentation

◆ FileCheckASTBinop()

llvm::FileCheckASTBinop::FileCheckASTBinop ( binop_eval_t  EvalBinop,
std::unique_ptr< FileCheckExpressionAST LeftOp,
std::unique_ptr< FileCheckExpressionAST RightOp 
)
inline

Definition at line 155 of file FileCheckImpl.h.

References llvm::FileCheckExpressionAST::eval().

Member Function Documentation

◆ eval()

Expected< uint64_t > FileCheckASTBinop::eval ( ) const
virtual

Evaluates the value of the binary operation represented by this AST, using EvalBinop on the result of recursively evaluating the operands.

Returns
the expression value or an error if an undefined numeric variable is used in one of the operands.

Implements llvm::FileCheckExpressionAST.

Definition at line 36 of file FileCheck.cpp.


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