Lines Matching refs:CharUnits

73   llvm::DenseMap<const CXXRecordDecl *, CharUnits> BaseOffsets;
76 llvm::DenseMap<const CXXRecordDecl *, CharUnits> VirtualBaseOffsets;
86 bool getExternalNVBaseOffset(const CXXRecordDecl *RD, CharUnits &BaseOffset) { in getExternalNVBaseOffset()
94 bool getExternalVBaseOffset(const CXXRecordDecl *RD, CharUnits &BaseOffset) { in getExternalVBaseOffset()
114 typedef llvm::DenseMap<CharUnits, ClassVectorTy> EmptyClassOffsetsMapTy;
119 CharUnits MaxEmptyClassOffset;
125 void AddSubobjectAtOffset(const CXXRecordDecl *RD, CharUnits Offset);
128 CharUnits Offset, bool PlacingEmptyBase);
132 CharUnits Offset);
133 void UpdateEmptyFieldSubobjects(const FieldDecl *FD, CharUnits Offset);
137 bool AnyEmptySubobjectsBeyondOffset(CharUnits Offset) const { in AnyEmptySubobjectsBeyondOffset()
141 CharUnits
152 CharUnits Offset) const;
155 CharUnits Offset);
159 CharUnits Offset) const;
161 CharUnits Offset) const;
167 CharUnits SizeOfLargestEmptySubobject;
179 CharUnits Offset);
183 bool CanPlaceFieldAtOffset(const FieldDecl *FD, CharUnits Offset);
191 CharUnits EmptySize; in ComputeEmptySubobjectSizes()
214 CharUnits EmptySize; in ComputeEmptySubobjectSizes()
232 CharUnits Offset) const { in CanPlaceSubobjectAtOffset()
250 CharUnits Offset) { in AddSubobjectAtOffset()
270 CharUnits Offset) { in CanPlaceBaseSubobjectAtOffset()
285 CharUnits BaseOffset = Offset + Layout.getBaseClassOffset(Base->Class); in CanPlaceBaseSubobjectAtOffset()
307 CharUnits FieldOffset = Offset + getFieldOffset(Layout, FieldNo); in CanPlaceBaseSubobjectAtOffset()
316 CharUnits Offset, in UpdateEmptyBaseSubobjects()
335 CharUnits BaseOffset = Offset + Layout.getBaseClassOffset(Base->Class); in UpdateEmptyBaseSubobjects()
354 CharUnits FieldOffset = Offset + getFieldOffset(Layout, FieldNo); in UpdateEmptyBaseSubobjects()
360 CharUnits Offset) { in CanPlaceBaseAtOffset()
378 CharUnits Offset) const { in CanPlaceFieldSubobjectAtOffset()
396 CharUnits BaseOffset = Offset + Layout.getBaseClassOffset(BaseDecl); in CanPlaceFieldSubobjectAtOffset()
406 CharUnits VBaseOffset = Offset + Layout.getVBaseClassOffset(VBaseDecl); in CanPlaceFieldSubobjectAtOffset()
419 CharUnits FieldOffset = Offset + getFieldOffset(Layout, FieldNo); in CanPlaceFieldSubobjectAtOffset()
430 CharUnits Offset) const { in CanPlaceFieldSubobjectAtOffset()
451 CharUnits ElementOffset = Offset; in CanPlaceFieldSubobjectAtOffset()
470 CharUnits Offset) { in CanPlaceFieldAtOffset()
482 CharUnits Offset) { in UpdateEmptyFieldSubobjects()
502 CharUnits BaseOffset = Offset + Layout.getBaseClassOffset(BaseDecl); in UpdateEmptyFieldSubobjects()
511 CharUnits VBaseOffset = Offset + Layout.getVBaseClassOffset(VBaseDecl); in UpdateEmptyFieldSubobjects()
523 CharUnits FieldOffset = Offset + getFieldOffset(Layout, FieldNo); in UpdateEmptyFieldSubobjects()
530 CharUnits Offset) { in UpdateEmptyFieldSubobjects()
548 CharUnits ElementOffset = Offset; in UpdateEmptyFieldSubobjects()
580 CharUnits Alignment;
583 CharUnits UnpackedAlignment;
615 CharUnits MaxFieldAlignment;
620 CharUnits NonVirtualSize;
621 CharUnits NonVirtualAlignment;
635 typedef llvm::DenseMap<const CXXRecordDecl *, CharUnits> BaseOffsetsMapTy;
661 Alignment(CharUnits::One()), UnpackedAlignment(CharUnits::One()), in ItaniumRecordLayoutBuilder()
665 MaxFieldAlignment(CharUnits::Zero()), DataSize(0), in ItaniumRecordLayoutBuilder()
666 NonVirtualSize(CharUnits::Zero()), in ItaniumRecordLayoutBuilder()
667 NonVirtualAlignment(CharUnits::One()), PrimaryBase(nullptr), in ItaniumRecordLayoutBuilder()
714 void EnsureVTablePointerAlignment(CharUnits UnpackedBaseAlign);
724 CharUnits Offset);
735 CharUnits LayoutBase(const BaseSubobjectInfo *Base);
744 void UpdateAlignment(CharUnits NewAlignment, CharUnits UnpackedNewAlignment);
745 void UpdateAlignment(CharUnits NewAlignment) { in UpdateAlignment()
763 CharUnits getSize() const { in getSize()
769 void setSize(CharUnits NewSize) { Size = Context.toBits(NewSize); } in setSize()
772 CharUnits getAligment() const { return Alignment; } in getAligment()
774 CharUnits getDataSize() const { in getDataSize()
780 void setDataSize(CharUnits NewSize) { DataSize = Context.toBits(NewSize); } in setDataSize()
966 CharUnits UnpackedBaseAlign) { in EnsureVTablePointerAlignment()
967 CharUnits BaseAlign = (Packed) ? CharUnits::One() : UnpackedBaseAlign; in EnsureVTablePointerAlignment()
1020 CharUnits PtrWidth = in LayoutNonVirtualBases()
1022 CharUnits PtrAlign = in LayoutNonVirtualBases()
1056 CharUnits Offset = LayoutBase(Base); in LayoutNonVirtualBase()
1066 const BaseSubobjectInfo *Info, CharUnits Offset) { in AddPrimaryVirtualBaseOffsets()
1093 CharUnits BaseOffset = Offset + Layout.getBaseClassOffset(Base->Class); in AddPrimaryVirtualBaseOffsets()
1149 CharUnits Offset = LayoutBase(Base); in LayoutVirtualBase()
1159 CharUnits
1164 CharUnits Offset; in LayoutBase()
1169 llvm::DenseMap<const CXXRecordDecl *, CharUnits>::iterator Known; in LayoutBase()
1176 CharUnits UnpackedBaseAlign = Layout.getNonVirtualAlignment(); in LayoutBase()
1177 CharUnits BaseAlign = (Packed) ? CharUnits::One() : UnpackedBaseAlign; in LayoutBase()
1181 (!HasExternalLayout || Offset == CharUnits::Zero()) && in LayoutBase()
1182 EmptySubobjects->CanPlaceBaseAtOffset(Base, CharUnits::Zero())) { in LayoutBase()
1186 return CharUnits::Zero(); in LayoutBase()
1210 Alignment = CharUnits::One(); in LayoutBase()
1239 MaxFieldAlignment = CharUnits::fromQuantity(DefaultMaxFieldAlignment); in InitializeLayout()
1248 MaxFieldAlignment = CharUnits::fromQuantity(2); in InitializeLayout()
1249 Alignment = CharUnits::fromQuantity(2); in InitializeLayout()
1396 CharUnits TypeAlign = Context.getTypeAlignInChars(Type); in LayoutWideBitField()
1718 CharUnits FieldOffset = in LayoutField()
1719 IsUnion ? CharUnits::Zero() : getDataSize(); in LayoutField()
1720 CharUnits FieldSize; in LayoutField()
1721 CharUnits FieldAlign; in LayoutField()
1728 FieldSize = CharUnits::Zero(); in LayoutField()
1738 std::pair<CharUnits, CharUnits> FieldInfo = in LayoutField()
1751 CharUnits TypeSize = Context.getTypeSizeInChars(BTy); in LayoutField()
1760 CharUnits UnpackedFieldAlign = FieldAlign; in LayoutField()
1761 CharUnits UnpackedFieldOffset = FieldOffset; in LayoutField()
1764 FieldAlign = CharUnits::One(); in LayoutField()
1765 CharUnits MaxAlignmentInChars = in LayoutField()
1809 CharUnits ASanAlignment = CharUnits::fromQuantity(8); in LayoutField()
1810 CharUnits ExtraSizeForAsan = ASanAlignment; in LayoutField()
1813 ASanAlignment - CharUnits::fromQuantity(FieldSize % ASanAlignment); in LayoutField()
1839 setSize(CharUnits::One()); in FinishLayout()
1842 setSize(CharUnits::One()); in FinishLayout()
1850 CharUnits UnpackedSize = Context.toCharUnitsFromBits(UnpackedSizeInBits); in FinishLayout()
1859 Alignment = CharUnits::One(); in FinishLayout()
1887 if (Packed && UnpackedAlignment > CharUnits::One() && in FinishLayout()
1895 CharUnits NewAlignment, CharUnits UnpackedNewAlignment) { in UpdateAlignment()
1922 Alignment = CharUnits::One(); in updateExternalFieldOffset()
2213 CharUnits Size;
2214 CharUnits Alignment;
2216 typedef llvm::DenseMap<const CXXRecordDecl *, CharUnits> BaseOffsetsMapTy;
2255 void placeFieldAtOffset(CharUnits FieldOffset) { in placeFieldAtOffset()
2268 CharUnits Size;
2270 CharUnits NonVirtualSize;
2272 CharUnits DataSize;
2274 CharUnits Alignment;
2276 CharUnits MaxFieldAlignment;
2279 CharUnits RequiredAlignment;
2283 CharUnits CurrentBitfieldSize;
2285 CharUnits VBPtrOffset;
2287 CharUnits MinEmptyStructSize;
2358 CharUnits FieldRequiredAlignment = in getAdjustedElementInfo()
2384 Info.Alignment = CharUnits::One(); in getAdjustedElementInfo()
2391 MinEmptyStructSize = CharUnits::fromQuantity(4); in layout()
2402 MinEmptyStructSize = CharUnits::One(); in cxxLayout()
2423 Size = CharUnits::Zero(); in initializeLayout()
2424 Alignment = CharUnits::One(); in initializeLayout()
2429 ? CharUnits::One() in initializeLayout()
2430 : CharUnits::Zero(); in initializeLayout()
2432 MaxFieldAlignment = CharUnits::Zero(); in initializeLayout()
2435 MaxFieldAlignment = CharUnits::fromQuantity(DefaultMaxFieldAlignment); in initializeLayout()
2445 MaxFieldAlignment = CharUnits::One(); in initializeLayout()
2540 VBPtrOffset = CharUnits::fromQuantity(-1); in layoutNonVirtualBases()
2575 CharUnits BaseOffset; in layoutNonVirtualBase()
2589 BaseLayout.getNonVirtualSize() == CharUnits::Zero()) { in layoutNonVirtualBase()
2590 BaseOffset = CharUnits::Zero(); in layoutNonVirtualBase()
2616 placeFieldAtOffset(CharUnits::Zero()); in layoutField()
2619 CharUnits FieldOffset; in layoutField()
2655 placeFieldAtOffset(CharUnits::Zero()); in layoutBitField()
2660 CharUnits FieldOffset = Size.alignTo(Info.Alignment); in layoutBitField()
2673 placeFieldAtOffset(IsUnion ? CharUnits::Zero() : Size); in layoutZeroWidthBitField()
2681 placeFieldAtOffset(CharUnits::Zero()); in layoutZeroWidthBitField()
2686 CharUnits FieldOffset = Size.alignTo(Info.Alignment); in layoutZeroWidthBitField()
2697 CharUnits InjectionSite = VBPtrOffset; in injectVBPtr()
2705 CharUnits FieldStart = VBPtrOffset + PointerInfo.Size; in injectVBPtr()
2708 CharUnits Offset = (FieldStart - InjectionSite) in injectVBPtr()
2723 CharUnits Offset = in injectVFPtr()
2747 CharUnits VtorDispSize = CharUnits::fromQuantity(4); in layoutVirtualBases()
2748 CharUnits VtorDispAlignment = VtorDispSize; in layoutVirtualBases()
2784 CharUnits BaseOffset; in layoutVirtualBases()
2953 Builder.NonVirtualSize, Builder.Alignment, CharUnits::Zero(), in getASTRecordLayout()
2976 CharUnits DataSize = in getASTRecordLayout()
2978 CharUnits NonVirtualSize = in getASTRecordLayout()
2984 CharUnits::fromQuantity(-1), DataSize, Builder.FieldOffsets, in getASTRecordLayout()
3124 CharUnits Offset, unsigned IndentLevel) { in PrintOffset()
3129 static void PrintBitFieldOffset(raw_ostream &OS, CharUnits Offset, in PrintBitFieldOffset()
3154 CharUnits Offset, in DumpRecordLayout()
3205 CharUnits BaseOffset = Offset + Layout.getBaseClassOffset(Base); in DumpRecordLayout()
3225 CharUnits FieldOffset = in DumpRecordLayout()
3257 CharUnits VBaseOffset = Offset + Layout.getVBaseClassOffset(VBase); in DumpRecordLayout()
3260 PrintOffset(OS, VBaseOffset - CharUnits::fromQuantity(4), IndentLevel); in DumpRecordLayout()
3293 ::DumpRecordLayout(OS, RD, *this, CharUnits(), 0, nullptr, in DumpRecordLayout()