LLVM 17.0.0git
Public Member Functions | List of all members
llvm::ExpressionValue Class Reference

Class representing a numeric value. More...

#include "FileCheck/FileCheckImpl.h"

Public Member Functions

template<class T >
 ExpressionValue (T Val)
 
bool operator== (const ExpressionValue &Other) const
 
bool operator!= (const ExpressionValue &Other) const
 
bool isNegative () const
 Returns true if value is signed and negative, false otherwise.
 
Expected< int64_t > getSignedValue () const
 
Expected< uint64_tgetUnsignedValue () const
 
ExpressionValue getAbsolute () const
 

Detailed Description

Class representing a numeric value.

Definition at line 121 of file FileCheckImpl.h.

Constructor & Destructor Documentation

◆ ExpressionValue()

template<class T >
llvm::ExpressionValue::ExpressionValue ( T  Val)
inlineexplicit

Definition at line 128 of file FileCheckImpl.h.

Member Function Documentation

◆ getAbsolute()

ExpressionValue ExpressionValue::getAbsolute ( ) const
Returns
an unsigned ExpressionValue instance whose value is the absolute value to this object's value.

Definition at line 185 of file FileCheck.cpp.

References getAsSigned().

Referenced by llvm::ExpressionFormat::getMatchingString(), llvm::operator*(), llvm::operator+(), llvm::operator-(), and llvm::operator/().

◆ getSignedValue()

Expected< int64_t > ExpressionValue::getSignedValue ( ) const
Returns
the value as a signed integer or an error if the value is out of range.

Definition at line 167 of file FileCheck.cpp.

References getAsSigned().

Referenced by llvm::ExpressionFormat::getMatchingString(), llvm::max(), llvm::operator+(), and llvm::operator-().

◆ getUnsignedValue()

Expected< uint64_t > ExpressionValue::getUnsignedValue ( ) const
Returns
the value as an unsigned integer or an error if the value is out of range.

Definition at line 178 of file FileCheck.cpp.

Referenced by llvm::ExpressionFormat::getMatchingString(), llvm::max(), llvm::operator*(), llvm::operator+(), llvm::operator-(), and llvm::operator/().

◆ isNegative()

bool llvm::ExpressionValue::isNegative ( ) const
inline

Returns true if value is signed and negative, false otherwise.

Definition at line 139 of file FileCheckImpl.h.

References assert().

Referenced by llvm::ExpressionFormat::getMatchingString(), llvm::max(), llvm::operator*(), llvm::operator+(), llvm::operator-(), llvm::operator/(), and operator==().

◆ operator!=()

bool llvm::ExpressionValue::operator!= ( const ExpressionValue Other) const
inline

Definition at line 134 of file FileCheckImpl.h.

References llvm::Other.

◆ operator==()

bool llvm::ExpressionValue::operator== ( const ExpressionValue Other) const
inline

Definition at line 130 of file FileCheckImpl.h.

References isNegative(), and llvm::Other.


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