clang 22.0.0git
clang::interp::Boolean Class Referencefinal

Wrapper around boolean types. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/AST/ByteCode/Boolean.h"

Public Member Functions

 Boolean ()
 Zero-initializes a boolean.
 Boolean (bool V)
bool operator< (Boolean RHS) const
bool operator> (Boolean RHS) const
bool operator> (unsigned RHS) const
Boolean operator- () const
Boolean operator- (const Boolean &Other) const
Boolean operator~ () const
Boolean operator! () const
template<typename Ty, typename = std::enable_if_t<std::is_integral_v<Ty>>>
 operator Ty () const
APSInt toAPSInt () const
APSInt toAPSInt (unsigned NumBits) const
APValue toAPValue (const ASTContext &) 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 bitcastToMemory (std::byte *Buff)
void print (llvm::raw_ostream &OS) const
std::string toDiagnosticString (const ASTContext &Ctx) 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 bitcastFromMemory (const std::byte *Buff, unsigned BitWidth)
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)
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() [1/2]

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

◆ Boolean() [2/2]

clang::interp::Boolean::Boolean ( bool V)
inlineexplicit

Definition at line 33 of file Boolean.h.

Member Function Documentation

◆ add()

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

Definition at line 128 of file Boolean.h.

References Boolean().

◆ bitcastFromMemory()

Boolean clang::interp::Boolean::bitcastFromMemory ( const std::byte * Buff,
unsigned BitWidth )
inlinestatic

Definition at line 78 of file Boolean.h.

References Boolean().

◆ bitcastToMemory()

void clang::interp::Boolean::bitcastToMemory ( std::byte * Buff)
inline

Definition at line 84 of file Boolean.h.

◆ bitWidth()

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

Definition at line 59 of file Boolean.h.

◆ compare()

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

Definition at line 70 of file Boolean.h.

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

◆ countLeadingZeros()

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

Definition at line 74 of file Boolean.h.

◆ decrement()

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

Definition at line 124 of file Boolean.h.

References Boolean().

◆ from() [1/3]

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

Definition at line 105 of file Boolean.h.

References Boolean().

◆ from() [2/3]

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

◆ from() [3/3]

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

Definition at line 111 of file Boolean.h.

References Boolean(), and clang::T.

◆ increment()

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

Definition at line 119 of file Boolean.h.

References Boolean().

◆ inRange()

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

Definition at line 115 of file Boolean.h.

◆ inv()

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

Definition at line 143 of file Boolean.h.

References Boolean().

◆ isMin()

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

Definition at line 61 of file Boolean.h.

References isZero().

◆ isMinusOne()

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

Definition at line 63 of file Boolean.h.

◆ isNegative()

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

Definition at line 67 of file Boolean.h.

Referenced by isPositive().

◆ isPositive()

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

Definition at line 68 of file Boolean.h.

References isNegative().

◆ isSigned()

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

Definition at line 65 of file Boolean.h.

◆ isZero()

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

Definition at line 60 of file Boolean.h.

Referenced by isMin().

◆ max()

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

Definition at line 95 of file Boolean.h.

References Boolean().

◆ min()

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

Definition at line 94 of file Boolean.h.

References Boolean().

◆ mul()

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

Definition at line 138 of file Boolean.h.

References Boolean().

◆ neg()

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

Definition at line 148 of file Boolean.h.

References Boolean().

◆ operator Ty()

template<typename Ty, typename = std::enable_if_t<std::is_integral_v<Ty>>>
clang::interp::Boolean::operator Ty ( ) const
inlineexplicit

Definition at line 45 of file Boolean.h.

◆ operator!()

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

Definition at line 42 of file Boolean.h.

References Boolean().

◆ operator-() [1/2]

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

Definition at line 39 of file Boolean.h.

References Boolean().

◆ operator-() [2/2]

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

Definition at line 40 of file Boolean.h.

References Boolean(), and clang::Other.

◆ operator<()

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

Definition at line 35 of file Boolean.h.

References Boolean().

◆ operator>() [1/2]

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

Definition at line 36 of file Boolean.h.

References Boolean().

◆ operator>() [2/2]

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

Definition at line 37 of file Boolean.h.

◆ operator~()

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

Definition at line 41 of file Boolean.h.

References Boolean().

◆ print()

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

Definition at line 86 of file Boolean.h.

Referenced by clang::interp::operator<<(), and toDiagnosticString().

◆ sub()

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

Definition at line 133 of file Boolean.h.

References Boolean().

◆ toAPSInt() [1/2]

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

Definition at line 49 of file Boolean.h.

Referenced by toAPSInt(), and toAPValue().

◆ toAPSInt() [2/2]

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

Definition at line 52 of file Boolean.h.

References toAPSInt().

◆ toAPValue()

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

Definition at line 55 of file Boolean.h.

References clang::APValue, and toAPSInt().

◆ toDiagnosticString()

std::string clang::interp::Boolean::toDiagnosticString ( const ASTContext & Ctx) const
inline

Definition at line 87 of file Boolean.h.

References print().

◆ toUnsigned()

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

Definition at line 57 of file Boolean.h.

References Boolean().

◆ truncate()

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

Definition at line 76 of file Boolean.h.

References Boolean().

◆ zero()

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

Definition at line 109 of file Boolean.h.

References Boolean(), and from().


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