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

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

#include "Support/FileCheckImpl.h"

Inheritance diagram for llvm::BinaryOperation:
[legend]
Collaboration diagram for llvm::BinaryOperation:
[legend]

Public Member Functions

 BinaryOperation (binop_eval_t EvalBinop, std::unique_ptr< ExpressionAST > LeftOp, std::unique_ptr< ExpressionAST > RightOp)
 
Expected< uint64_t > eval () const override
 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::ExpressionAST
virtual ~ExpressionAST ()=default
 

Detailed Description

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

Definition at line 142 of file FileCheckImpl.h.

Constructor & Destructor Documentation

◆ BinaryOperation()

llvm::BinaryOperation::BinaryOperation ( binop_eval_t  EvalBinop,
std::unique_ptr< ExpressionAST >  LeftOp,
std::unique_ptr< ExpressionAST >  RightOp 
)
inline

Definition at line 154 of file FileCheckImpl.h.

References llvm::ExpressionAST::eval().

Member Function Documentation

◆ eval()

Expected< uint64_t > BinaryOperation::eval ( ) const
overridevirtual

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::ExpressionAST.

Definition at line 36 of file FileCheck.cpp.


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