13#ifndef LLVM_CLANG_AST_INTERP_TYPE_H
14#define LLVM_CLANG_AST_INTERP_TYPE_H
61constexpr size_t align(
size_t Size) {
62 return ((Size +
alignof(
void *) - 1) /
alignof(
void *)) *
alignof(
void *);
66static_assert(
aligned(
sizeof(
void *)));
77#define TYPE_SWITCH_CASE(Name, B) \
78 case Name: { using T = PrimConv<Name>::T; B; break; }
79#define TYPE_SWITCH(Expr, B) \
82 TYPE_SWITCH_CASE(PT_Sint8, B) \
83 TYPE_SWITCH_CASE(PT_Uint8, B) \
84 TYPE_SWITCH_CASE(PT_Sint16, B) \
85 TYPE_SWITCH_CASE(PT_Uint16, B) \
86 TYPE_SWITCH_CASE(PT_Sint32, B) \
87 TYPE_SWITCH_CASE(PT_Uint32, B) \
88 TYPE_SWITCH_CASE(PT_Sint64, B) \
89 TYPE_SWITCH_CASE(PT_Uint64, B) \
90 TYPE_SWITCH_CASE(PT_Float, B) \
91 TYPE_SWITCH_CASE(PT_Bool, B) \
92 TYPE_SWITCH_CASE(PT_Ptr, B) \
95#define COMPOSITE_TYPE_SWITCH(Expr, B, D) \
98 TYPE_SWITCH_CASE(PT_Ptr, B) \
99 default: { D; break; } \
The base class of the type hierarchy.
Wrapper around boolean types.
Wrapper around numeric types.
A pointer to a memory block, live or dead.
constexpr bool aligned(uintptr_t Value)
constexpr size_t align(size_t Size)
Aligns a size to the pointer alignment.
PrimType
Enumeration of the primitive types of the VM.
size_t primSize(PrimType Type)
Returns the size of a primitive type in bytes.
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
Mapping from primitive types to their representation.