49 : StructSize(
TypeSize::getFixed(0)) {
50 assert(!
ST->isOpaque() &&
"Cannot get layout of opaque structs");
52 NumElements =
ST->getNumElements();
55 for (
unsigned i = 0, e = NumElements; i !=
e; ++i) {
56 Type *Ty =
ST->getElementType(i);
60 const Align TyAlign =
ST->isPacked() ?
Align(1) :
DL.getABITypeAlign(Ty);
69 if (!StructSize.isScalable() && !
isAligned(TyAlign, StructSize)) {
75 StructAlignment = std::max(TyAlign, StructAlignment);
77 getMemberOffsets()[i] = StructSize;
79 StructSize +=
DL.getTypeAllocSize(Ty);
84 if (!StructSize.isScalable() && !
isAligned(StructAlignment, StructSize)) {
94 "Cannot get element at offset for structure containing scalable "
100 std::upper_bound(MemberOffsets.
begin(), MemberOffsets.
end(),
Offset,
102 return TypeSize::isKnownLT(LHS, RHS);
104 assert(SI != MemberOffsets.
begin() &&
"Offset not in structure type!");
109 (SI + 1 == MemberOffsets.
end() ||
111 "Upper bound didn't work!");
118 return SI - MemberOffsets.
begin();
123class StructLayoutMap {
125 LayoutInfoTy LayoutInfo;
130 for (
const auto &
I : LayoutInfo) {
132 Value->~StructLayout();
153 ABIAlign ==
Other.ABIAlign && PrefAlign ==
Other.PrefAlign &&
154 IndexBitWidth ==
Other.IndexBitWidth;
159struct LessPrimitiveBitWidth {
161 unsigned RHSBitWidth)
const {
162 return LHS.BitWidth < RHSBitWidth;
167struct LessPointerAddrSpace {
169 unsigned RHSAddrSpace)
const {
170 return LHS.AddrSpace < RHSAddrSpace;
176 if (
T.isOSBinFormatGOFF())
178 if (
T.isOSBinFormatMachO())
180 if ((
T.isOSWindows() ||
T.isUEFI()) &&
T.isOSBinFormatCOFF())
182 if (
T.isOSBinFormatXCOFF())
190 {1, Align::Constant<1>(), Align::Constant<1>()},
191 {8, Align::Constant<1>(), Align::Constant<1>()},
192 {16, Align::Constant<2>(), Align::Constant<2>()},
193 {32, Align::Constant<4>(), Align::Constant<4>()},
194 {64, Align::Constant<4>(), Align::Constant<8>()},
197 {16, Align::Constant<2>(), Align::Constant<2>()},
198 {32, Align::Constant<4>(), Align::Constant<4>()},
199 {64, Align::Constant<8>(), Align::Constant<8>()},
200 {128, Align::Constant<16>(), Align::Constant<16>()},
203 {64, Align::Constant<8>(), Align::Constant<8>()},
204 {128, Align::Constant<16>(), Align::Constant<16>()},
209 {0, 64, Align::Constant<8>(), Align::Constant<8>(), 64}
219 if (
Error Err = parseLayoutString(LayoutString))
224 delete static_cast<StructLayoutMap *
>(LayoutMap);
226 StringRepresentation =
Other.StringRepresentation;
227 BigEndian =
Other.BigEndian;
228 AllocaAddrSpace =
Other.AllocaAddrSpace;
229 ProgramAddrSpace =
Other.ProgramAddrSpace;
230 DefaultGlobalsAddrSpace =
Other.DefaultGlobalsAddrSpace;
231 StackNaturalAlign =
Other.StackNaturalAlign;
232 FunctionPtrAlign =
Other.FunctionPtrAlign;
233 TheFunctionPtrAlignType =
Other.TheFunctionPtrAlignType;
234 ManglingMode =
Other.ManglingMode;
235 LegalIntWidths =
Other.LegalIntWidths;
236 IntSpecs =
Other.IntSpecs;
237 FloatSpecs =
Other.FloatSpecs;
238 VectorSpecs =
Other.VectorSpecs;
239 PointerSpecs =
Other.PointerSpecs;
240 StructABIAlignment =
Other.StructABIAlignment;
241 StructPrefAlignment =
Other.StructPrefAlignment;
242 NonIntegralAddressSpaces =
Other.NonIntegralAddressSpaces;
249 return BigEndian ==
Other.BigEndian &&
250 AllocaAddrSpace ==
Other.AllocaAddrSpace &&
251 ProgramAddrSpace ==
Other.ProgramAddrSpace &&
252 DefaultGlobalsAddrSpace ==
Other.DefaultGlobalsAddrSpace &&
253 StackNaturalAlign ==
Other.StackNaturalAlign &&
254 FunctionPtrAlign ==
Other.FunctionPtrAlign &&
255 TheFunctionPtrAlignType ==
Other.TheFunctionPtrAlignType &&
256 ManglingMode ==
Other.ManglingMode &&
257 LegalIntWidths ==
Other.LegalIntWidths && IntSpecs ==
Other.IntSpecs &&
258 FloatSpecs ==
Other.FloatSpecs && VectorSpecs ==
Other.VectorSpecs &&
259 PointerSpecs ==
Other.PointerSpecs &&
260 StructABIAlignment ==
Other.StructABIAlignment &&
261 StructPrefAlignment ==
Other.StructPrefAlignment;
266 if (
Error Err = Layout.parseLayoutString(LayoutString))
267 return std::move(Err);
277 std::pair<StringRef, StringRef> &Split) {
278 assert(!Str.empty() &&
"parse error, string can't be empty here");
279 Split = Str.split(Separator);
280 if (Split.second.empty() && Split.first != Str)
281 return reportError(
"Trailing separator in datalayout string");
282 if (!Split.second.empty() && Split.first.empty())
283 return reportError(
"Expected token before separator in datalayout string");
289 bool error = R.getAsInteger(10, Result); (void)
error;
291 return reportError(
"not a number, or does not fit in an unsigned int");
297template <
typename IntTy>
299 if (
Error Err = getInt<IntTy>(R, Result))
302 return reportError(
"number of bits must be a byte width multiple");
310 if (!isUInt<24>(AddrSpace))
311 return reportError(
"Invalid address space, must be a 24-bit integer");
317 std::pair<StringRef, StringRef>
Split;
334 return reportError(
"Address space 0 can never be non-integral");
336 }
while (!Rest.
empty());
341 char SpecifierChar = Tok.
front();
344 switch (SpecifierChar) {
357 unsigned AddrSpace = 0;
361 if (!isUInt<24>(AddrSpace))
362 return reportError(
"Invalid address space, must be a 24-bit integer");
367 "Missing size specification for pointer in datalayout string");
370 unsigned PointerMemSize;
374 return reportError(
"Invalid pointer size of 0 bytes");
379 "Missing alignment specification for pointer in datalayout string");
382 unsigned PointerABIAlign;
386 return reportError(
"Pointer ABI alignment must be a power of 2");
390 unsigned IndexSize = PointerMemSize;
393 unsigned PointerPrefAlign = PointerABIAlign;
400 return reportError(
"Pointer preferred alignment must be a power of 2");
409 return reportError(
"Invalid index size of 0 bytes");
412 if (
Error Err = setPointerSpec(AddrSpace, PointerMemSize,
422 TypeSpecifier Specifier;
423 switch (SpecifierChar) {
427 Specifier = TypeSpecifier::Integer;
430 Specifier = TypeSpecifier::Vector;
433 Specifier = TypeSpecifier::Float;
436 Specifier = TypeSpecifier::Aggregate;
446 if (Specifier == TypeSpecifier::Aggregate &&
Size != 0)
447 return reportError(
"Sized aggregate specification in datalayout string");
452 "Missing alignment specification in datalayout string");
458 if (Specifier != TypeSpecifier::Aggregate && !ABIAlign)
460 "ABI alignment specification must be >0 for non-aggregate types");
462 if (!isUInt<16>(ABIAlign))
463 return reportError(
"Invalid ABI alignment, must be a 16bit integer");
465 return reportError(
"Invalid ABI alignment, must be a power of 2");
466 if (Specifier == TypeSpecifier::Integer &&
Size == 8 && ABIAlign != 1)
467 return reportError(
"Invalid ABI alignment, i8 must be naturally aligned");
470 unsigned PrefAlign = ABIAlign;
478 if (!isUInt<16>(PrefAlign))
480 "Invalid preferred alignment, must be a 16bit integer");
482 return reportError(
"Invalid preferred alignment, must be a power of 2");
497 "Zero width native integer type in datalayout string");
510 return reportError(
"Alignment is neither 0 nor a power of 2");
515 switch (Tok.
front()) {
523 return reportError(
"Unknown function pointer alignment type in "
524 "datalayout string");
531 return reportError(
"Alignment is neither 0 nor a power of 2");
552 return reportError(
"Unexpected trailing characters after mangling "
553 "specifier in datalayout string");
555 return reportError(
"Expected mangling specifier in datalayout string");
557 return reportError(
"Unknown mangling specifier in datalayout string");
560 return reportError(
"Unknown mangling in datalayout string");
562 ManglingMode = MM_ELF;
565 ManglingMode = MM_GOFF;
568 ManglingMode = MM_MachO;
571 ManglingMode = MM_Mips;
574 ManglingMode = MM_WinCOFF;
577 ManglingMode = MM_WinCOFFX86;
580 ManglingMode = MM_XCOFF;
585 return reportError(
"Unknown specifier in datalayout string");
592 StringRepresentation = std::string(LayoutString);
594 if (LayoutString.
empty())
602 if (
Error Err = parseSpecification(
Spec))
615 assert(
Log2(ABIAlign) < 16 &&
Log2(PrefAlign) < 16 &&
"Alignment too big");
617 return reportError(
"Invalid bit width, must be a 24-bit integer");
618 if (PrefAlign < ABIAlign)
620 "Preferred alignment cannot be less than the ABI alignment");
624 case TypeSpecifier::Aggregate:
625 StructABIAlignment = ABIAlign;
626 StructPrefAlignment = PrefAlign;
628 case TypeSpecifier::Integer:
631 case TypeSpecifier::Float:
634 case TypeSpecifier::Vector:
635 Specs = &VectorSpecs;
642 I->ABIAlign = ABIAlign;
643 I->PrefAlign = PrefAlign;
652DataLayout::getPointerSpec(
uint32_t AddrSpace)
const {
653 if (AddrSpace != 0) {
654 auto I =
lower_bound(PointerSpecs, AddrSpace, LessPointerAddrSpace());
655 if (
I != PointerSpecs.end() &&
I->AddrSpace == AddrSpace)
659 assert(PointerSpecs[0].AddrSpace == 0);
660 return PointerSpecs[0];
666 if (PrefAlign < ABIAlign)
668 "Preferred alignment cannot be less than the ABI alignment");
670 return reportError(
"Index width cannot be larger than pointer width");
672 auto I =
lower_bound(PointerSpecs, AddrSpace, LessPointerAddrSpace());
673 if (
I == PointerSpecs.end() ||
I->AddrSpace != AddrSpace) {
674 PointerSpecs.insert(
I, PointerSpec{AddrSpace,
BitWidth, ABIAlign, PrefAlign,
678 I->ABIAlign = ABIAlign;
679 I->PrefAlign = PrefAlign;
680 I->IndexBitWidth = IndexBitWidth;
686 bool abi_or_pref)
const {
691 if (
I == IntSpecs.end())
693 return abi_or_pref ?
I->ABIAlign :
I->PrefAlign;
700 LayoutMap =
new StructLayoutMap();
702 StructLayoutMap *STM =
static_cast<StructLayoutMap*
>(LayoutMap);
733 unsigned MaxIndexSize = 0;
743 "This should only be called with a pointer or pointer vector type");
749 return divideCeil(getPointerSpec(AS).IndexBitWidth, 8);
754 "This should only be called with a pointer or pointer vector type");
767Align DataLayout::getAlignment(
Type *Ty,
bool abi_or_pref)
const {
768 assert(Ty->
isSized() &&
"Cannot getTypeInfo() on a type that is unsized!");
774 unsigned AS = cast<PointerType>(Ty)->getAddressSpace();
779 return getAlignment(cast<ArrayType>(Ty)->getElementType(), abi_or_pref);
783 if (cast<StructType>(Ty)->isPacked() && abi_or_pref)
788 const Align Align = abi_or_pref ? StructABIAlignment : StructPrefAlignment;
804 if (
I != FloatSpecs.end() &&
I->BitWidth ==
BitWidth)
805 return abi_or_pref ?
I->ABIAlign :
I->PrefAlign;
819 if (
I != VectorSpecs.end() &&
I->BitWidth ==
BitWidth)
820 return abi_or_pref ?
I->ABIAlign :
I->PrefAlign;
833 Type *LayoutTy = cast<TargetExtType>(Ty)->getLayoutType();
834 return getAlignment(LayoutTy, abi_or_pref);
842 return getAlignment(Ty,
true);
846 return getAlignment(Ty,
false);
856 "Expected a pointer or pointer vector type.");
859 if (
VectorType *VecTy = dyn_cast<VectorType>(Ty))
865 for (
unsigned LegalIntWidth : LegalIntWidths)
866 if (Width <= LegalIntWidth)
873 return Max != LegalIntWidths.
end() ? *Max : 0;
883 "Expected a pointer or pointer vector type.");
886 if (
VectorType *VecTy = dyn_cast<VectorType>(Ty))
898 for (; GTI != GTE; ++GTI) {
901 assert(
Idx->getType()->isIntegerTy(32) &&
"Illegal struct idx");
902 unsigned FieldNo = cast<ConstantInt>(
Idx)->getZExtValue();
910 if (int64_t ArrayIdx = cast<ConstantInt>(
Idx)->getSExtValue())
930 if (
Offset.isNegative()) {
934 assert(
Offset.isNonNegative() &&
"Remaining offset shouldn't be negative");
941 if (
auto *ArrTy = dyn_cast<ArrayType>(ElemTy)) {
942 ElemTy = ArrTy->getElementType();
946 if (isa<VectorType>(ElemTy)) {
953 if (
auto *STy = dyn_cast<StructType>(ElemTy)) {
961 ElemTy = STy->getElementType(
Index);
1002 if (*GVAlignment >= Alignment)
1003 Alignment = *GVAlignment;
1012 if (Alignment <
Align(16)) {
1016 Alignment =
Align(16);
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static Error reportError(StringRef Message)
This file contains the declarations for the subclasses of Constant, which represent the different fla...
static Error getInt(StringRef R, IntTy &Result)
Get an unsigned integer, including error checks.
static APInt getElementIndex(TypeSize ElemSize, APInt &Offset)
static Error getIntInBytes(StringRef R, IntTy &Result)
Get an unsigned integer representing the number of bits and convert it into bytes.
static Error getAddrSpace(StringRef R, unsigned &AddrSpace)
constexpr DataLayout::PrimitiveSpec DefaultFloatSpecs[]
constexpr DataLayout::PrimitiveSpec DefaultVectorSpecs[]
constexpr DataLayout::PointerSpec DefaultPointerSpecs[]
static Error split(StringRef Str, char Separator, std::pair< StringRef, StringRef > &Split)
Checked version of split, to ensure mandatory subparts.
constexpr DataLayout::PrimitiveSpec DefaultIntSpecs[]
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
This file defines the DenseMap class.
This file defines counterparts of C library allocation functions defined in the namespace 'std'.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Class for arbitrary precision integers.
static APInt getZero(unsigned numBits)
Get the '0' value for the specified bit-width.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
A parsed version of the target data layout string in and methods for querying it.
static const char * getManglingComponent(const Triple &T)
unsigned getPointerSizeInBits(unsigned AS=0) const
Layout pointer size, in bits FIXME: The defaults need to be removed once all of the backends/clients ...
unsigned getMaxIndexSize() const
Returns the maximum index size over all address spaces.
@ MultipleOfFunctionAlign
The function pointer alignment is a multiple of the function alignment.
@ Independent
The function pointer alignment is independent of the function alignment.
SmallVector< APInt > getGEPIndicesForOffset(Type *&ElemTy, APInt &Offset) const
Get GEP indices to access Offset inside ElemTy.
unsigned getLargestLegalIntTypeSizeInBits() const
Returns the size of largest legal integer type size, or 0 if none are set.
unsigned getIndexSize(unsigned AS) const
rounded up to a whole number of bytes.
const StructLayout * getStructLayout(StructType *Ty) const
Returns a StructLayout object, indicating the alignment of the struct, its size, and the offsets of i...
DataLayout()
Constructs a DataLayout with default values.
IntegerType * getIntPtrType(LLVMContext &C, unsigned AddressSpace=0) const
Returns an integer type with size at least as big as that of a pointer in the given address space.
Align getABITypeAlign(Type *Ty) const
Returns the minimum ABI-required alignment for the specified type.
unsigned getIndexTypeSizeInBits(Type *Ty) const
Layout size of the index used in GEP calculation.
unsigned getPointerTypeSizeInBits(Type *) const
Layout pointer size, in bits, based on the type.
DataLayout & operator=(const DataLayout &Other)
IntegerType * getIndexType(LLVMContext &C, unsigned AddressSpace) const
Returns the type of a GEP index in AddressSpace.
TypeSize getTypeAllocSize(Type *Ty) const
Returns the offset in bytes between successive objects of the specified type, including alignment pad...
std::optional< APInt > getGEPIndexForOffset(Type *&ElemTy, APInt &Offset) const
Get single GEP index to access Offset inside ElemTy.
Type * getSmallestLegalIntType(LLVMContext &C, unsigned Width=0) const
Returns the smallest integer type with size at least as big as Width bits.
Align getPreferredAlign(const GlobalVariable *GV) const
Returns the preferred alignment of the specified global.
unsigned getPointerSize(unsigned AS=0) const
Layout pointer size in bytes, rounded up to a whole number of bytes.
Align getPointerPrefAlignment(unsigned AS=0) const
Return target's alignment for stack-based pointers FIXME: The defaults need to be removed once all of...
unsigned getIndexSizeInBits(unsigned AS) const
Size in bits of index used for address calculation in getelementptr.
TypeSize getTypeSizeInBits(Type *Ty) const
Size examples:
TypeSize getTypeStoreSize(Type *Ty) const
Returns the maximum number of bytes that may be overwritten by storing the specified type.
bool operator==(const DataLayout &Other) const
int64_t getIndexedOffsetInType(Type *ElemTy, ArrayRef< Value * > Indices) const
Returns the offset from the beginning of the type for the specified indices.
Align getPointerABIAlignment(unsigned AS) const
Layout pointer alignment.
Align getPrefTypeAlign(Type *Ty) const
Returns the preferred stack/global alignment for the specified type.
static Expected< DataLayout > parse(StringRef LayoutString)
Parse a data layout string and return the layout.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
MaybeAlign getAlign() const
Returns the alignment of the given variable or function.
bool hasSection() const
Check if this global has a custom object file section.
Type * getValueType() const
bool hasInitializer() const
Definitions have initializers, declarations don't.
Class to represent integer types.
static IntegerType * get(LLVMContext &C, unsigned NumBits)
This static method is the primary way of constructing an IntegerType.
This is an important class for using LLVM in a threaded context.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
iterator insert(iterator I, T &&Elt)
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
constexpr StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
constexpr bool empty() const
empty - Check if the string is empty.
constexpr size_t size() const
size - Get the string size.
char front() const
front - Get the first character in the string.
Used to lazily calculate structure layout information for a target machine, based on the DataLayout s...
TypeSize getSizeInBytes() const
MutableArrayRef< TypeSize > getMemberOffsets()
unsigned getElementContainingOffset(uint64_t FixedOffset) const
Given a valid byte offset into the structure, returns the structure index that contains it.
TypeSize getElementOffset(unsigned Idx) const
Align getAlignment() const
Class to represent struct types.
unsigned getNumElements() const
Random access to the elements.
Triple - Helper class for working with autoconf configuration names.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
static constexpr TypeSize getFixed(ScalarTy ExactSize)
static constexpr TypeSize getScalable(ScalarTy MinimumSize)
The instances of the Type class are immutable: once they are created, they are never changed.
unsigned getIntegerBitWidth() const
@ X86_AMXTyID
AMX vectors (8192 bits, X86 specific)
@ HalfTyID
16-bit floating point type
@ TargetExtTyID
Target extension type.
@ ScalableVectorTyID
Scalable SIMD vector type.
@ FloatTyID
32-bit floating point type
@ IntegerTyID
Arbitrary bit width integers.
@ FixedVectorTyID
Fixed width SIMD vector type.
@ BFloatTyID
16-bit floating point type (7-bit significand)
@ DoubleTyID
64-bit floating point type
@ X86_FP80TyID
80-bit floating point type (X87)
@ PPC_FP128TyID
128-bit floating point type (two 64-bits, PowerPC)
@ FP128TyID
128-bit floating point type (112-bit significand)
static IntegerType * getIntNTy(LLVMContext &C, unsigned N)
bool isSized(SmallPtrSetImpl< Type * > *Visited=nullptr) const
Return true if it makes sense to take the size of this type.
LLVMContext & getContext() const
Return the LLVMContext in which this type was uniqued.
bool isPtrOrPtrVectorTy() const
Return true if this is a pointer type or a vector of pointer types.
bool isScalableTy() const
Return true if this is a type whose size is a known multiple of vscale.
TypeID getTypeID() const
Return the type id for the type.
Type * getScalarType() const
If this is a vector type, return the element type, otherwise return 'this'.
LLVM Value Representation.
Base class of all SIMD vector types.
static VectorType * get(Type *ElementType, ElementCount EC)
This static method is the primary way to construct an VectorType.
constexpr ScalarTy getFixedValue() const
static constexpr bool isKnownLE(const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
constexpr bool isScalable() const
Returns whether the quantity is scaled by a runtime quantity (vscale).
constexpr ScalarTy getKnownMinValue() const
Returns the minimum value this quantity can represent.
static constexpr bool isKnownGT(const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
StructType * getStructTypeOrNull() const
TypeSize getSequentialElementStride(const DataLayout &DL) const
Value * getOperand() const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
bool isUIntN(unsigned N, uint64_t x)
Checks if an unsigned integer fits into the given (dynamic) bit width.
bool isAligned(Align Lhs, uint64_t SizeInBytes)
Checks that SizeInBytes is a multiple of the alignment.
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
constexpr bool isPowerOf2_64(uint64_t Value)
Return true if the argument is a power of two > 0 (64 bit edition.)
gep_type_iterator gep_type_end(const User *GEP)
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
uint64_t PowerOf2Ceil(uint64_t A)
Returns the power of two which is greater than or equal to the given value.
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
LLVM_ATTRIBUTE_RETURNS_NONNULL void * safe_malloc(size_t Sz)
constexpr T divideCeil(U Numerator, V Denominator)
Returns the integer ceil(Numerator / Denominator).
auto lower_bound(R &&Range, T &&Value)
Provide wrappers to std::lower_bound which take ranges instead of having to pass begin/end explicitly...
uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
auto max_element(R &&Range)
constexpr unsigned BitWidth
gep_type_iterator gep_type_begin(const User *GEP)
Align assumeAligned(uint64_t Value)
Treats the value 0 as a 1, so Align is always at least 1.
unsigned Log2(Align A)
Returns the log2 of the alignment.
This struct is a compact representation of a valid (non-zero power of two) alignment.
Pointer type specification.
bool operator==(const PointerSpec &Other) const
Primitive type specification.
bool operator==(const PrimitiveSpec &Other) const
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.