clang  10.0.0svn
Public Member Functions | Static Public Member Functions | List of all members
clang::interp::Boolean Class Reference

Wrapper around boolean types. More...

#include "/opt/doxygen-docs/src/llvm/tools/clang/lib/AST/Interp/Boolean.h"

Public Member Functions

 Boolean ()
 Zero-initializes a boolean. More...
 
bool operator< (Boolean RHS) const
 
bool operator> (Boolean RHS) const
 
bool operator<= (Boolean RHS) const
 
bool operator>= (Boolean RHS) const
 
bool operator== (Boolean RHS) const
 
bool operator!= (Boolean RHS) const
 
bool operator> (unsigned RHS) const
 
Boolean operator- () const
 
Boolean operator~ () const
 
 operator unsigned () const
 
 operator int64_t () const
 
 operator uint64_t () const
 
APSInt toAPSInt () const
 
APSInt toAPSInt (unsigned NumBits) const
 
APValue toAPValue () const
 
Boolean toUnsigned () const
 
bool isZero () const
 
bool isMin () const
 
ComparisonCategoryResult compare (const Boolean &RHS) const
 
unsigned countLeadingZeros () const
 
Boolean truncate (unsigned TruncBits) const
 
void print (llvm::raw_ostream &OS) const
 

Static Public Member Functions

static constexpr unsigned bitWidth ()
 
static constexpr bool isMinusOne ()
 
static constexpr bool isSigned ()
 
static constexpr bool isNegative ()
 
static constexpr bool isPositive ()
 
static Boolean min (unsigned NumBits)
 
static Boolean max (unsigned NumBits)
 
template<typename T >
static std::enable_if< std::is_integral< T >::value, Boolean >::type from (T Value)
 
template<unsigned SrcBits, bool SrcSign>
static std::enable_if< SrcBits !=0, Boolean >::type from (Integral< SrcBits, SrcSign > Value)
 
template<bool SrcSign>
static Boolean from (Integral< 0, SrcSign > Value)
 
static Boolean zero ()
 
template<typename T >
static Boolean from (T Value, unsigned NumBits)
 
static bool inRange (int64_t Value, unsigned NumBits)
 
static bool increment (Boolean A, Boolean *R)
 
static bool decrement (Boolean A, Boolean *R)
 
static bool add (Boolean A, Boolean B, unsigned OpBits, Boolean *R)
 
static bool sub (Boolean A, Boolean B, unsigned OpBits, Boolean *R)
 
static bool mul (Boolean A, Boolean B, unsigned OpBits, Boolean *R)
 

Detailed Description

Wrapper around boolean types.

Definition at line 25 of file Boolean.h.

Constructor & Destructor Documentation

◆ Boolean()

clang::interp::Boolean::Boolean ( )
inline

Zero-initializes a boolean.

Definition at line 35 of file Boolean.h.

Referenced by add(), from(), increment(), max(), min(), mul(), operator-(), operator~(), and sub().

Member Function Documentation

◆ add()

static bool clang::interp::Boolean::add ( Boolean  A,
Boolean  B,
unsigned  OpBits,
Boolean R 
)
inlinestatic

Definition at line 124 of file Boolean.h.

References Boolean().

◆ bitWidth()

static constexpr unsigned clang::interp::Boolean::bitWidth ( )
inlinestatic

Definition at line 63 of file Boolean.h.

◆ compare()

ComparisonCategoryResult clang::interp::Boolean::compare ( const Boolean RHS) const
inline

Definition at line 74 of file Boolean.h.

References clang::interp::Compare().

◆ countLeadingZeros()

unsigned clang::interp::Boolean::countLeadingZeros ( ) const
inline

Definition at line 78 of file Boolean.h.

◆ decrement()

static bool clang::interp::Boolean::decrement ( Boolean  A,
Boolean R 
)
inlinestatic

Definition at line 120 of file Boolean.h.

◆ from() [1/4]

template<typename T >
static std::enable_if<std::is_integral<T>::value, Boolean>::type clang::interp::Boolean::from ( Value)
inlinestatic

Definition at line 89 of file Boolean.h.

References Boolean().

Referenced by zero().

◆ from() [2/4]

template<unsigned SrcBits, bool SrcSign>
static std::enable_if<SrcBits != 0, Boolean>::type clang::interp::Boolean::from ( Integral< SrcBits, SrcSign >  Value)
inlinestatic

Definition at line 94 of file Boolean.h.

References Boolean(), and clang::interp::Integral< Bits, Signed >::isZero().

◆ from() [3/4]

template<bool SrcSign>
static Boolean clang::interp::Boolean::from ( Integral< 0, SrcSign >  Value)
inlinestatic

Definition at line 100 of file Boolean.h.

References Boolean(), and clang::interp::Integral< Bits, Signed >::isZero().

◆ from() [4/4]

template<typename T >
static Boolean clang::interp::Boolean::from ( Value,
unsigned  NumBits 
)
inlinestatic

Definition at line 107 of file Boolean.h.

References Boolean().

◆ increment()

static bool clang::interp::Boolean::increment ( Boolean  A,
Boolean R 
)
inlinestatic

Definition at line 115 of file Boolean.h.

References Boolean().

◆ inRange()

static bool clang::interp::Boolean::inRange ( int64_t  Value,
unsigned  NumBits 
)
inlinestatic

Definition at line 111 of file Boolean.h.

◆ isMin()

bool clang::interp::Boolean::isMin ( ) const
inline

Definition at line 65 of file Boolean.h.

References isZero().

◆ isMinusOne()

static constexpr bool clang::interp::Boolean::isMinusOne ( )
inlinestatic

Definition at line 67 of file Boolean.h.

◆ isNegative()

static constexpr bool clang::interp::Boolean::isNegative ( )
inlinestatic

Definition at line 71 of file Boolean.h.

Referenced by isPositive().

◆ isPositive()

static constexpr bool clang::interp::Boolean::isPositive ( )
inlinestatic

Definition at line 72 of file Boolean.h.

References isNegative().

◆ isSigned()

static constexpr bool clang::interp::Boolean::isSigned ( )
inlinestatic

Definition at line 69 of file Boolean.h.

◆ isZero()

bool clang::interp::Boolean::isZero ( ) const
inline

Definition at line 64 of file Boolean.h.

Referenced by isMin().

◆ max()

static Boolean clang::interp::Boolean::max ( unsigned  NumBits)
inlinestatic

Definition at line 85 of file Boolean.h.

References Boolean().

◆ min()

static Boolean clang::interp::Boolean::min ( unsigned  NumBits)
inlinestatic

Definition at line 84 of file Boolean.h.

References Boolean().

◆ mul()

static bool clang::interp::Boolean::mul ( Boolean  A,
Boolean  B,
unsigned  OpBits,
Boolean R 
)
inlinestatic

Definition at line 134 of file Boolean.h.

References Boolean().

◆ operator int64_t()

clang::interp::Boolean::operator int64_t ( ) const
inlineexplicit

Definition at line 50 of file Boolean.h.

◆ operator uint64_t()

clang::interp::Boolean::operator uint64_t ( ) const
inlineexplicit

Definition at line 51 of file Boolean.h.

◆ operator unsigned()

clang::interp::Boolean::operator unsigned ( ) const
inlineexplicit

Definition at line 49 of file Boolean.h.

◆ operator!=()

bool clang::interp::Boolean::operator!= ( Boolean  RHS) const
inline

Definition at line 42 of file Boolean.h.

◆ operator-()

Boolean clang::interp::Boolean::operator- ( ) const
inline

Definition at line 46 of file Boolean.h.

References Boolean().

◆ operator<()

bool clang::interp::Boolean::operator< ( Boolean  RHS) const
inline

Definition at line 37 of file Boolean.h.

◆ operator<=()

bool clang::interp::Boolean::operator<= ( Boolean  RHS) const
inline

Definition at line 39 of file Boolean.h.

◆ operator==()

bool clang::interp::Boolean::operator== ( Boolean  RHS) const
inline

Definition at line 41 of file Boolean.h.

◆ operator>() [1/2]

bool clang::interp::Boolean::operator> ( Boolean  RHS) const
inline

Definition at line 38 of file Boolean.h.

◆ operator>() [2/2]

bool clang::interp::Boolean::operator> ( unsigned  RHS) const
inline

Definition at line 44 of file Boolean.h.

◆ operator>=()

bool clang::interp::Boolean::operator>= ( Boolean  RHS) const
inline

Definition at line 40 of file Boolean.h.

◆ operator~()

Boolean clang::interp::Boolean::operator~ ( ) const
inline

Definition at line 47 of file Boolean.h.

References Boolean().

◆ print()

void clang::interp::Boolean::print ( llvm::raw_ostream &  OS) const
inline

Definition at line 82 of file Boolean.h.

Referenced by clang::interp::operator<<().

◆ sub()

static bool clang::interp::Boolean::sub ( Boolean  A,
Boolean  B,
unsigned  OpBits,
Boolean R 
)
inlinestatic

Definition at line 129 of file Boolean.h.

References Boolean().

◆ toAPSInt() [1/2]

APSInt clang::interp::Boolean::toAPSInt ( ) const
inline

Definition at line 53 of file Boolean.h.

Referenced by toAPSInt(), and toAPValue().

◆ toAPSInt() [2/2]

APSInt clang::interp::Boolean::toAPSInt ( unsigned  NumBits) const
inline

Definition at line 56 of file Boolean.h.

References toAPSInt().

◆ toAPValue()

APValue clang::interp::Boolean::toAPValue ( ) const
inline

Definition at line 59 of file Boolean.h.

References toAPSInt().

◆ toUnsigned()

Boolean clang::interp::Boolean::toUnsigned ( ) const
inline

Definition at line 61 of file Boolean.h.

◆ truncate()

Boolean clang::interp::Boolean::truncate ( unsigned  TruncBits) const
inline

Definition at line 80 of file Boolean.h.

◆ zero()

static Boolean clang::interp::Boolean::zero ( )
inlinestatic

Definition at line 104 of file Boolean.h.

References from().


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