clang  16.0.0git
Public Member Functions | Static Public Member Functions | List of all members
clang::interp::Boolean Class Referencefinal

Wrapper around boolean types. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/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 int8_t () const
 
 operator uint8_t () const
 
 operator int16_t () const
 
 operator uint16_t () const
 
 operator int32_t () const
 
 operator uint32_t () const
 
 operator int64_t () const
 
 operator uint64_t () const
 
 operator bool () 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

constexpr static unsigned bitWidth ()
 
constexpr static bool isMinusOne ()
 
constexpr static bool isSigned ()
 
constexpr static bool isNegative ()
 
constexpr static bool isPositive ()
 
static Boolean min (unsigned NumBits)
 
static Boolean max (unsigned NumBits)
 
template<typename T >
static Boolean from (T Value)
 
template<unsigned SrcBits, bool SrcSign>
static std::enable_if_t< SrcBits !=0, Booleanfrom (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)
 
static bool inv (Boolean A, Boolean *R)
 
static bool neg (Boolean A, 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.

References V.

Referenced by add(), from(), increment(), inv(), max(), min(), mul(), neg(), 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 130 of file Boolean.h.

References Boolean().

◆ bitWidth()

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

Definition at line 69 of file Boolean.h.

◆ compare()

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

Definition at line 80 of file Boolean.h.

References clang::interp::Compare(), and V.

◆ countLeadingZeros()

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

Definition at line 84 of file Boolean.h.

References V.

◆ decrement()

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

Definition at line 126 of file Boolean.h.

◆ from() [1/4]

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

Definition at line 106 of file Boolean.h.

References Boolean().

◆ from() [2/4]

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

Definition at line 101 of file Boolean.h.

References Boolean().

◆ from() [3/4]

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

Definition at line 93 of file Boolean.h.

References Boolean().

Referenced by zero().

◆ from() [4/4]

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

Definition at line 113 of file Boolean.h.

References Boolean().

◆ increment()

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

Definition at line 121 of file Boolean.h.

References Boolean().

◆ inRange()

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

Definition at line 117 of file Boolean.h.

◆ inv()

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

Definition at line 145 of file Boolean.h.

References Boolean().

◆ isMin()

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

Definition at line 71 of file Boolean.h.

References isZero().

◆ isMinusOne()

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

Definition at line 73 of file Boolean.h.

◆ isNegative()

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

Definition at line 77 of file Boolean.h.

Referenced by isPositive().

◆ isPositive()

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

Definition at line 78 of file Boolean.h.

References isNegative().

◆ isSigned()

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

Definition at line 75 of file Boolean.h.

◆ isZero()

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

Definition at line 70 of file Boolean.h.

References V.

Referenced by isMin().

◆ max()

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

Definition at line 91 of file Boolean.h.

References Boolean().

◆ min()

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

Definition at line 90 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 140 of file Boolean.h.

References Boolean().

◆ neg()

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

Definition at line 150 of file Boolean.h.

References Boolean().

◆ operator bool()

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

Definition at line 57 of file Boolean.h.

References V.

◆ operator int16_t()

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

Definition at line 51 of file Boolean.h.

References V.

◆ operator int32_t()

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

Definition at line 53 of file Boolean.h.

References V.

◆ operator int64_t()

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

Definition at line 55 of file Boolean.h.

References V.

◆ operator int8_t()

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

Definition at line 49 of file Boolean.h.

References V.

◆ operator uint16_t()

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

Definition at line 52 of file Boolean.h.

References V.

◆ operator uint32_t()

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

Definition at line 54 of file Boolean.h.

References V.

◆ operator uint64_t()

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

Definition at line 56 of file Boolean.h.

References V.

◆ operator uint8_t()

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

Definition at line 50 of file Boolean.h.

References V.

◆ operator!=()

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

Definition at line 42 of file Boolean.h.

References V.

◆ operator-()

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

Definition at line 46 of file Boolean.h.

References Boolean(), and V.

◆ operator<()

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

Definition at line 37 of file Boolean.h.

References V.

◆ operator<=()

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

Definition at line 39 of file Boolean.h.

References V.

◆ operator==()

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

Definition at line 41 of file Boolean.h.

References V.

◆ operator>() [1/2]

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

Definition at line 38 of file Boolean.h.

References V.

◆ operator>() [2/2]

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

Definition at line 44 of file Boolean.h.

References V.

◆ operator>=()

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

Definition at line 40 of file Boolean.h.

References V.

◆ 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 88 of file Boolean.h.

References V.

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

◆ sub()

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

Definition at line 135 of file Boolean.h.

References Boolean().

◆ toAPSInt() [1/2]

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

Definition at line 59 of file Boolean.h.

References V.

Referenced by toAPSInt(), and toAPValue().

◆ toAPSInt() [2/2]

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

Definition at line 62 of file Boolean.h.

References toAPSInt().

◆ toAPValue()

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

Definition at line 65 of file Boolean.h.

References toAPSInt().

◆ toUnsigned()

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

Definition at line 67 of file Boolean.h.

◆ truncate()

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

Definition at line 86 of file Boolean.h.

◆ zero()

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

Definition at line 110 of file Boolean.h.

References from().


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