|
clang 24.0.0git
|
Wrapper around numeric types. More...
#include "/work/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/AST/ByteCode/Integral.h"
Public Types | |
| using | ReprT = typename Repr<Bits, Signed>::Type |
| using | AsUnsigned = Integral<Bits, false> |
Public Member Functions | |
| Integral () | |
| Zero-initializes an integral. | |
| template<unsigned SrcBits, bool SrcSign> | |
| Integral (Integral< SrcBits, SrcSign > V) | |
| Constructs an integral from another integral. | |
| Integral (IntegralKind Kind, const void *P, OffsetT Offset=0) | |
| Pointer integral of the given kind. | |
| Integral (const AddrLabelExpr *P1, const AddrLabelExpr *P2) | |
| AddrLabelDiff integral. | |
| IntegralKind | getKind () const |
| bool | isNumber () const |
| const void * | getPtr () const |
| ReprT | getOffset () const |
| const AddrLabelExpr * | getLabel1 () const |
| const AddrLabelExpr * | getLabel2 () const |
| Integral (const APSInt &V) | |
| Construct an integral from a value based on signedness. | |
| bool | operator< (Integral RHS) const |
| bool | operator> (Integral RHS) const |
| bool | operator<= (Integral RHS) const |
| bool | operator>= (Integral RHS) const |
| bool | operator== (Integral RHS) const |
| bool | operator!= (Integral RHS) const |
| bool | operator>= (unsigned RHS) const |
| bool | operator> (unsigned RHS) const |
| Integral | operator- () const |
| Integral | operator- (const Integral &Other) const |
| Integral | operator~ () const |
| template<unsigned DstBits, bool DstSign> | |
| operator Integral< DstBits, DstSign > () const | |
| template<typename Ty, typename = std::enable_if_t<std::is_integral_v<Ty>>> | |
| operator Ty () const | |
| APSInt | toAPSInt () const |
| APSInt | toAPSInt (unsigned BitWidth) const |
| APInt | toAPInt (unsigned BitWidth) const |
| APValue | toAPValue (const ASTContext &) const |
| Integral< Bits, false > | toUnsigned () const |
| bool | isZero () const |
| bool | isMin () const |
| bool | isMinusOne () const |
| bool | isNegative () const |
| bool | isPositive () const |
| ComparisonCategoryResult | compare (const Integral &RHS) const |
| void | bitcastToMemory (std::byte *Dest) const |
| std::string | toDiagnosticString (const ASTContext &Ctx) const |
| unsigned | countLeadingZeros () const |
| Integral | truncate (unsigned TruncBits) const |
| void | print (llvm::raw_ostream &OS) const |
Static Public Member Functions | |
| static constexpr unsigned | bitWidth () |
| static constexpr bool | isSigned () |
| static Integral | bitcastFromMemory (const std::byte *Src, unsigned BitWidth) |
| static Integral | min (unsigned NumBits) |
| static Integral | max (unsigned NumBits) |
| static Integral | zero (unsigned BitWidth=0) |
| template<typename ValT> | |
| static std::enable_if_t<!std::is_same_v< ValT, IntegralKind >, Integral > | from (ValT V, unsigned NumBits=0) |
| template<unsigned SrcBits, bool SrcSign> | |
| static std::enable_if_t< SrcBits !=0, Integral > | from (Integral< SrcBits, SrcSign > V) |
| template<typename T> | |
| static Integral | from (IntegralKind Kind, T V) |
| static bool | increment (Integral A, Integral *R) |
| static bool | decrement (Integral A, Integral *R) |
| static bool | add (Integral A, Integral B, unsigned OpBits, Integral *R) |
| static bool | sub (Integral A, Integral B, unsigned OpBits, Integral *R) |
| static bool | mul (Integral A, Integral B, unsigned OpBits, Integral *R) |
| static bool | rem (Integral A, Integral B, unsigned OpBits, Integral *R) |
| static bool | div (Integral A, Integral B, unsigned OpBits, Integral *R) |
| static bool | bitAnd (Integral A, Integral B, unsigned OpBits, Integral *R) |
| static bool | bitOr (Integral A, Integral B, unsigned OpBits, Integral *R) |
| static bool | bitXor (Integral A, Integral B, unsigned OpBits, Integral *R) |
| static bool | neg (Integral A, Integral *R) |
| static bool | comp (Integral A, Integral *R) |
| template<unsigned RHSBits, bool RHSSign> | |
| static void | shiftLeft (const Integral A, const Integral< RHSBits, RHSSign > B, unsigned OpBits, Integral *R) |
| template<unsigned RHSBits, bool RHSSign> | |
| static void | shiftRight (const Integral A, const Integral< RHSBits, RHSSign > B, unsigned OpBits, Integral *R) |
Friends | |
| template<unsigned OtherBits, bool OtherSigned> | |
| class | Integral |
Wrapper around numeric types.
These wrappers are required to shared an interface between APSint and builtin primitive numeral types, while optimising for storage and allowing methods operating on primitive type to compile to fast code.
Definition at line 69 of file Integral.h.
Definition at line 104 of file Integral.h.
Definition at line 74 of file Integral.h.
|
inline |
Zero-initializes an integral.
Definition at line 107 of file Integral.h.
|
inlineexplicit |
Constructs an integral from another integral.
Definition at line 111 of file Integral.h.
|
inlineexplicit |
Pointer integral of the given kind.
Definition at line 114 of file Integral.h.
|
inlineexplicit |
AddrLabelDiff integral.
Definition at line 121 of file Integral.h.
|
inlineexplicit |
Construct an integral from a value based on signedness.
Definition at line 149 of file Integral.h.
|
inlinestatic |
Definition at line 366 of file Integral.h.
Referenced by clang::interp::Integral< Bits, false >::increment().
|
inlinestatic |
Definition at line 393 of file Integral.h.
|
inlinestatic |
Definition at line 261 of file Integral.h.
|
inline |
Definition at line 256 of file Integral.h.
|
inlinestatic |
Definition at line 399 of file Integral.h.
|
inlinestaticconstexpr |
Definition at line 243 of file Integral.h.
Referenced by clang::interp::Integral< Bits, false >::decrement(), clang::interp::Integral< Bits, false >::increment(), and clang::interp::Integral< Bits, false >::isMin().
|
inlinestatic |
Definition at line 405 of file Integral.h.
|
inlinestatic |
Definition at line 419 of file Integral.h.
|
inline |
Definition at line 252 of file Integral.h.
|
inline |
Definition at line 276 of file Integral.h.
|
inlinestatic |
Definition at line 361 of file Integral.h.
|
inlinestatic |
Definition at line 387 of file Integral.h.
|
inlinestatic |
Definition at line 336 of file Integral.h.
|
inlinestatic |
Definition at line 352 of file Integral.h.
|
inlinestatic |
|
inline |
Definition at line 127 of file Integral.h.
|
inline |
Definition at line 139 of file Integral.h.
|
inline |
Definition at line 143 of file Integral.h.
|
inline |
Definition at line 134 of file Integral.h.
|
inline |
Definition at line 129 of file Integral.h.
|
inlinestatic |
Definition at line 356 of file Integral.h.
|
inline |
Definition at line 247 of file Integral.h.
Referenced by clang::interp::Integral< Bits, false >::neg().
|
inline |
Definition at line 248 of file Integral.h.
|
inline |
Definition at line 249 of file Integral.h.
Referenced by clang::interp::Integral< Bits, false >::isPositive().
|
inline |
Definition at line 128 of file Integral.h.
Referenced by clang::interp::Integral< Bits, false >::add(), clang::interp::Integral< Bits, false >::bitAnd(), clang::interp::Integral< Bits, false >::bitcastToMemory(), clang::interp::Integral< Bits, false >::bitOr(), clang::interp::Integral< Bits, false >::bitXor(), clang::interp::Integral< Bits, false >::countLeadingZeros(), clang::interp::Integral< Bits, false >::decrement(), clang::interp::Integral< Bits, false >::div(), clang::interp::Integral< Bits, false >::getOffset(), clang::interp::Integral< Bits, false >::getPtr(), clang::interp::Integral< Bits, false >::increment(), clang::interp::Integral< Bits, false >::mul(), clang::interp::Integral< Bits, false >::rem(), clang::interp::Integral< Bits, false >::sub(), clang::interp::Integral< Bits, false >::toAPInt(), and clang::interp::Integral< Bits, false >::toAPSInt().
|
inline |
Definition at line 250 of file Integral.h.
Referenced by clang::interp::Integral< Bits, false >::countLeadingZeros().
|
inlinestaticconstexpr |
Definition at line 244 of file Integral.h.
|
inline |
Definition at line 246 of file Integral.h.
|
inlinestatic |
Definition at line 322 of file Integral.h.
|
inlinestatic |
Definition at line 321 of file Integral.h.
Referenced by clang::interp::Integral< Bits, false >::isMin().
|
inlinestatic |
Definition at line 376 of file Integral.h.
|
inlinestatic |
Definition at line 411 of file Integral.h.
|
inlineexplicit |
Definition at line 173 of file Integral.h.
|
inlineexplicit |
Definition at line 178 of file Integral.h.
|
inline |
Definition at line 157 of file Integral.h.
|
inline |
Definition at line 166 of file Integral.h.
|
inline |
Definition at line 167 of file Integral.h.
|
inline |
Definition at line 152 of file Integral.h.
|
inline |
Definition at line 154 of file Integral.h.
|
inline |
Definition at line 156 of file Integral.h.
|
inline |
Definition at line 153 of file Integral.h.
|
inline |
Definition at line 162 of file Integral.h.
|
inline |
Definition at line 155 of file Integral.h.
|
inline |
Definition at line 158 of file Integral.h.
|
inline |
Definition at line 170 of file Integral.h.
|
inline |
Definition at line 296 of file Integral.h.
Referenced by clang::interp::operator<<().
|
inlinestatic |
Definition at line 381 of file Integral.h.
|
inlinestatic |
Definition at line 425 of file Integral.h.
|
inlinestatic |
Definition at line 431 of file Integral.h.
|
inlinestatic |
Definition at line 371 of file Integral.h.
Referenced by clang::interp::Integral< Bits, false >::decrement().
|
inline |
Definition at line 191 of file Integral.h.
Referenced by clang::interp::Integral< Bits, false >::toAPSInt().
|
inline |
Definition at line 182 of file Integral.h.
Referenced by clang::interp::Integral< Bits, false >::toAPValue().
|
inline |
Definition at line 187 of file Integral.h.
|
inline |
Definition at line 201 of file Integral.h.
|
inline |
Definition at line 269 of file Integral.h.
Definition at line 239 of file Integral.h.
|
inline |
Definition at line 286 of file Integral.h.
|
inlinestatic |
Definition at line 323 of file Integral.h.
|
friend |
Definition at line 79 of file Integral.h.
Referenced by clang::interp::Integral< Bits, false >::bitAnd(), clang::interp::Integral< Bits, false >::bitcastFromMemory(), clang::interp::Integral< Bits, false >::bitOr(), clang::interp::Integral< Bits, false >::bitXor(), clang::interp::Integral< Bits, false >::comp(), clang::interp::Integral< Bits, false >::decrement(), clang::interp::Integral< Bits, false >::div(), clang::interp::Integral< Bits, false >::from(), clang::interp::Integral< Bits, false >::from(), clang::interp::Integral< Bits, false >::from(), clang::interp::Integral< Bits, false >::increment(), clang::interp::Integral< Bits, false >::max(), clang::interp::Integral< Bits, false >::min(), clang::interp::Integral< Bits, false >::operator Integral< DstBits, DstSign >(), clang::interp::Integral< Bits, false >::operator-(), clang::interp::Integral< Bits, false >::operator-(), clang::interp::Integral< Bits, false >::operator~(), clang::interp::Integral< Bits, false >::rem(), and clang::interp::Integral< Bits, false >::truncate().
| struct { ... } clang::interp::Integral< Bits, Signed >::AddrLabelDiff |
| const AddrLabelExpr* clang::interp::Integral< Bits, Signed >::L1 |
Definition at line 89 of file Integral.h.
| const AddrLabelExpr* clang::interp::Integral< Bits, Signed >::L2 |
Definition at line 90 of file Integral.h.
| OffsetT clang::interp::Integral< Bits, Signed >::Offset |
Definition at line 86 of file Integral.h.
| const void* clang::interp::Integral< Bits, Signed >::P |
Definition at line 85 of file Integral.h.
| struct { ... } clang::interp::Integral< Bits, Signed >::Ptr |
Definition at line 83 of file Integral.h.
Referenced by clang::interp::Integral< Bits, false >::add(), clang::interp::Integral< Bits, false >::bitAnd(), clang::interp::Integral< Bits, false >::bitOr(), clang::interp::Integral< Bits, false >::bitXor(), clang::interp::Integral< Bits, false >::comp(), clang::interp::Integral< Bits, false >::compare(), clang::interp::Integral< Bits, false >::div(), clang::interp::Integral< Bits, false >::mul(), clang::interp::Integral< Bits, false >::operator!=(), clang::interp::Integral< Bits, false >::operator<(), clang::interp::Integral< Bits, false >::operator<=(), clang::interp::Integral< Bits, false >::operator==(), clang::interp::Integral< Bits, false >::operator>(), clang::interp::Integral< Bits, false >::operator>=(), clang::interp::Integral< Bits, false >::rem(), clang::interp::Integral< Bits, false >::shiftLeft(), clang::interp::Integral< Bits, false >::shiftRight(), and clang::interp::Integral< Bits, false >::sub().