llvm.org GIT mirror llvm / 58be60c
DebugInfo: change alignment type from uint64_t to uint32_t to save space. In futher patches we shall have alignment field added to DIVariable family and switching from uint64_t to uint32_t will save 4 bytes per variable. Differential Revision: https://reviews.llvm.org/D25620 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@284482 91177308-0d34-0410-b5e6-96231b3b80d8 Victor Leschuk 4 years ago
13 changed file(s) with 120 addition(s) and 116 deletion(s). Raw diff Collapse all Expand all
106106 LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef Dref,
107107 const char *Name,
108108 uint64_t SizeInBits,
109 uint64_t AlignInBits,
109 uint32_t AlignInBits,
110110 unsigned Encoding) {
111111 DIBuilder *D = unwrap(Dref);
112112 return wrap(D->createBasicType(Name, SizeInBits, AlignInBits, Encoding));
115115 LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef Dref,
116116 LLVMMetadataRef PointeeType,
117117 uint64_t SizeInBits,
118 uint64_t AlignInBits,
118 uint32_t AlignInBits,
119119 const char *Name) {
120120 DIBuilder *D = unwrap(Dref);
121121 return wrap(D->createPointerType(unwrap(PointeeType), SizeInBits,
133133 LLVMMetadataRef LLVMDIBuilderCreateStructType(
134134 LLVMDIBuilderRef Dref, LLVMMetadataRef Scope, const char *Name,
135135 LLVMMetadataRef File, unsigned Line, uint64_t SizeInBits,
136 uint64_t AlignInBits, unsigned Flags, LLVMMetadataRef DerivedFrom,
136 uint32_t AlignInBits, unsigned Flags, LLVMMetadataRef DerivedFrom,
137137 LLVMMetadataRef ElementTypes) {
138138 DIBuilder *D = unwrap(Dref);
139139 return wrap(D->createStructType(
146146 LLVMMetadataRef LLVMDIBuilderCreateReplaceableCompositeType(
147147 LLVMDIBuilderRef Dref, unsigned Tag, const char *Name,
148148 LLVMMetadataRef Scope, LLVMMetadataRef File, unsigned Line,
149 unsigned RuntimeLang, uint64_t SizeInBits, uint64_t AlignInBits,
149 unsigned RuntimeLang, uint64_t SizeInBits, uint32_t AlignInBits,
150150 unsigned Flags) {
151151 DIBuilder *D = unwrap(Dref);
152152 return wrap(D->createReplaceableCompositeType(
159159 LLVMDIBuilderCreateMemberType(LLVMDIBuilderRef Dref, LLVMMetadataRef Scope,
160160 const char *Name, LLVMMetadataRef File,
161161 unsigned Line, uint64_t SizeInBits,
162 uint64_t AlignInBits, uint64_t OffsetInBits,
162 uint32_t AlignInBits, uint64_t OffsetInBits,
163163 unsigned Flags, LLVMMetadataRef Ty) {
164164 DIBuilder *D = unwrap(Dref);
165165 return wrap(D->createMemberType(
170170
171171 LLVMMetadataRef LLVMDIBuilderCreateArrayType(LLVMDIBuilderRef Dref,
172172 uint64_t SizeInBits,
173 uint64_t AlignInBits,
173 uint32_t AlignInBits,
174174 LLVMMetadataRef ElementType,
175175 LLVMMetadataRef Subscripts) {
176176 DIBuilder *D = unwrap(Dref);
7070 LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef D,
7171 const char *Name,
7272 uint64_t SizeInBits,
73 uint64_t AlignInBits,
73 uint32_t AlignInBits,
7474 unsigned Encoding);
7575
7676 LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef D,
7777 LLVMMetadataRef PointeeType,
7878 uint64_t SizeInBits,
79 uint64_t AlignInBits,
79 uint32_t AlignInBits,
8080 const char *Name);
8181
8282 LLVMMetadataRef
8686 LLVMMetadataRef LLVMDIBuilderCreateStructType(
8787 LLVMDIBuilderRef D, LLVMMetadataRef Scope, const char *Name,
8888 LLVMMetadataRef File, unsigned Line, uint64_t SizeInBits,
89 uint64_t AlignInBits, unsigned Flags, LLVMMetadataRef DerivedFrom,
89 uint32_t AlignInBits, unsigned Flags, LLVMMetadataRef DerivedFrom,
9090 LLVMMetadataRef ElementTypes);
9191
9292 LLVMMetadataRef LLVMDIBuilderCreateReplaceableCompositeType(
9393 LLVMDIBuilderRef D, unsigned Tag, const char *Name, LLVMMetadataRef Scope,
9494 LLVMMetadataRef File, unsigned Line, unsigned RuntimeLang,
95 uint64_t SizeInBits, uint64_t AlignInBits, unsigned Flags);
95 uint64_t SizeInBits, uint32_t AlignInBits, unsigned Flags);
9696
9797 LLVMMetadataRef
9898 LLVMDIBuilderCreateMemberType(LLVMDIBuilderRef D, LLVMMetadataRef Scope,
9999 const char *Name, LLVMMetadataRef File,
100100 unsigned Line, uint64_t SizeInBits,
101 uint64_t AlignInBits, uint64_t OffsetInBits,
101 uint32_t AlignInBits, uint64_t OffsetInBits,
102102 unsigned Flags, LLVMMetadataRef Ty);
103103
104104 LLVMMetadataRef LLVMDIBuilderCreateArrayType(LLVMDIBuilderRef D,
105105 uint64_t SizeInBits,
106 uint64_t AlignInBits,
106 uint32_t AlignInBits,
107107 LLVMMetadataRef ElementType,
108108 LLVMMetadataRef Subscripts);
109109
276276 type DIBasicType struct {
277277 Name string
278278 SizeInBits uint64
279 AlignInBits uint64
279 AlignInBits uint32
280280 Encoding DwarfTypeEncoding
281281 }
282282
288288 d.ref,
289289 name,
290290 C.uint64_t(t.SizeInBits),
291 C.uint64_t(t.AlignInBits),
291 C.uint32_t(t.AlignInBits),
292292 C.unsigned(t.Encoding),
293293 )
294294 return Metadata{C: result}
298298 type DIPointerType struct {
299299 Pointee Metadata
300300 SizeInBits uint64
301 AlignInBits uint64 // optional
301 AlignInBits uint32 // optional
302302 Name string // optional
303303 }
304304
310310 d.ref,
311311 t.Pointee.C,
312312 C.uint64_t(t.SizeInBits),
313 C.uint64_t(t.AlignInBits),
313 C.uint32_t(t.AlignInBits),
314314 name,
315315 )
316316 return Metadata{C: result}
339339 File Metadata
340340 Line int
341341 SizeInBits uint64
342 AlignInBits uint64
342 AlignInBits uint32
343343 Flags int
344344 DerivedFrom Metadata
345345 Elements []Metadata
357357 t.File.C,
358358 C.unsigned(t.Line),
359359 C.uint64_t(t.SizeInBits),
360 C.uint64_t(t.AlignInBits),
360 C.uint32_t(t.AlignInBits),
361361 C.unsigned(t.Flags),
362362 t.DerivedFrom.C,
363363 elements.C,
374374 Line int
375375 RuntimeLang int
376376 SizeInBits uint64
377 AlignInBits uint64
377 AlignInBits uint32
378378 Flags int
379379 }
380380
391391 C.unsigned(t.Line),
392392 C.unsigned(t.RuntimeLang),
393393 C.uint64_t(t.SizeInBits),
394 C.uint64_t(t.AlignInBits),
394 C.uint32_t(t.AlignInBits),
395395 C.unsigned(t.Flags),
396396 )
397397 return Metadata{C: result}
403403 File Metadata
404404 Line int
405405 SizeInBits uint64
406 AlignInBits uint64
406 AlignInBits uint32
407407 OffsetInBits uint64
408408 Flags int
409409 Type Metadata
420420 t.File.C,
421421 C.unsigned(t.Line),
422422 C.uint64_t(t.SizeInBits),
423 C.uint64_t(t.AlignInBits),
423 C.uint32_t(t.AlignInBits),
424424 C.uint64_t(t.OffsetInBits),
425425 C.unsigned(t.Flags),
426426 t.Type.C,
437437 // DIArrayType holds the values for creating array type debug metadata.
438438 type DIArrayType struct {
439439 SizeInBits uint64
440 AlignInBits uint64
440 AlignInBits uint32
441441 ElementType Metadata
442442 Subscripts []DISubrange
443443 }
452452 result := C.LLVMDIBuilderCreateArrayType(
453453 d.ref,
454454 C.uint64_t(t.SizeInBits),
455 C.uint64_t(t.AlignInBits),
455 C.uint32_t(t.AlignInBits),
456456 t.ElementType.C,
457457 subscripts.C,
458458 )
122122 /// \param AlignInBits Type alignment.
123123 /// \param Encoding DWARF encoding code, e.g. dwarf::DW_ATE_float.
124124 DIBasicType *createBasicType(StringRef Name, uint64_t SizeInBits,
125 uint64_t AlignInBits, unsigned Encoding);
125 uint32_t AlignInBits, unsigned Encoding);
126126
127127 /// Create debugging information entry for a qualified
128128 /// type, e.g. 'const int'.
136136 /// \param AlignInBits Alignment. (optional)
137137 /// \param Name Pointer type name. (optional)
138138 DIDerivedType *createPointerType(DIType *PointeeTy, uint64_t SizeInBits,
139 uint64_t AlignInBits = 0,
139 uint32_t AlignInBits = 0,
140140 StringRef Name = "");
141141
142142 /// Create debugging information entry for a pointer to member.
146146 /// \param Class Type for which this pointer points to members of.
147147 DIDerivedType *
148148 createMemberPointerType(DIType *PointeeTy, DIType *Class,
149 uint64_t SizeInBits, uint64_t AlignInBits = 0,
149 uint64_t SizeInBits, uint32_t AlignInBits = 0,
150150 DINode::DIFlags Flags = DINode::FlagZero);
151151
152152 /// Create debugging information entry for a c++
153153 /// style reference or rvalue reference type.
154154 DIDerivedType *createReferenceType(unsigned Tag, DIType *RTy,
155155 uint64_t SizeInBits = 0,
156 uint64_t AlignInBits = 0);
156 uint32_t AlignInBits = 0);
157157
158158 /// Create debugging information entry for a typedef.
159159 /// \param Ty Original type.
190190 /// \param Ty Parent type.
191191 DIDerivedType *createMemberType(DIScope *Scope, StringRef Name,
192192 DIFile *File, unsigned LineNo,
193 uint64_t SizeInBits, uint64_t AlignInBits,
193 uint64_t SizeInBits,
194 uint32_t AlignInBits,
194195 uint64_t OffsetInBits,
195196 DINode::DIFlags Flags, DIType *Ty);
196197
207208 /// \param Ty Parent type.
208209 DIDerivedType *createBitFieldMemberType(
209210 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo,
210 uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits,
211 uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits,
211212 uint64_t StorageOffsetInBits, DINode::DIFlags Flags, DIType *Ty);
212213
213214 /// Create debugging information entry for a
236237 /// \param Ty Parent type.
237238 /// \param PropertyNode Property associated with this ivar.
238239 DIDerivedType *createObjCIVar(StringRef Name, DIFile *File, unsigned LineNo,
239 uint64_t SizeInBits, uint64_t AlignInBits,
240 uint64_t SizeInBits, uint32_t AlignInBits,
240241 uint64_t OffsetInBits, DINode::DIFlags Flags,
241242 DIType *Ty, MDNode *PropertyNode);
242243
273274 /// \param UniqueIdentifier A unique identifier for the class.
274275 DICompositeType *createClassType(
275276 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
276 uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits,
277 uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits,
277278 DINode::DIFlags Flags, DIType *DerivedFrom, DINodeArray Elements,
278279 DIType *VTableHolder = nullptr, MDNode *TemplateParms = nullptr,
279280 StringRef UniqueIdentifier = "");
291292 /// \param UniqueIdentifier A unique identifier for the struct.
292293 DICompositeType *createStructType(
293294 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
294 uint64_t SizeInBits, uint64_t AlignInBits, DINode::DIFlags Flags,
295 uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags,
295296 DIType *DerivedFrom, DINodeArray Elements, unsigned RunTimeLang = 0,
296297 DIType *VTableHolder = nullptr, StringRef UniqueIdentifier = "");
297298
308309 /// \param UniqueIdentifier A unique identifier for the union.
309310 DICompositeType *createUnionType(DIScope *Scope, StringRef Name,
310311 DIFile *File, unsigned LineNumber,
311 uint64_t SizeInBits, uint64_t AlignInBits,
312 uint64_t SizeInBits, uint32_t AlignInBits,
312313 DINode::DIFlags Flags,
313314 DINodeArray Elements,
314315 unsigned RunTimeLang = 0,
358359 /// \param AlignInBits Alignment.
359360 /// \param Ty Element type.
360361 /// \param Subscripts Subscripts.
361 DICompositeType *createArrayType(uint64_t Size, uint64_t AlignInBits,
362 DICompositeType *createArrayType(uint64_t Size, uint32_t AlignInBits,
362363 DIType *Ty, DINodeArray Subscripts);
363364
364365 /// Create debugging information entry for a vector type.
366367 /// \param AlignInBits Alignment.
367368 /// \param Ty Element type.
368369 /// \param Subscripts Subscripts.
369 DICompositeType *createVectorType(uint64_t Size, uint64_t AlignInBits,
370 DICompositeType *createVectorType(uint64_t Size, uint32_t AlignInBits,
370371 DIType *Ty, DINodeArray Subscripts);
371372
372373 /// Create debugging information entry for an
382383 /// \param UniqueIdentifier A unique identifier for the enum.
383384 DICompositeType *createEnumerationType(
384385 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
385 uint64_t SizeInBits, uint64_t AlignInBits, DINodeArray Elements,
386 uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements,
386387 DIType *UnderlyingType, StringRef UniqueIdentifier = "");
387388
388389 /// Create subroutine type.
415416 DIScope *Scope, DIFile *F, unsigned Line,
416417 unsigned RuntimeLang = 0,
417418 uint64_t SizeInBits = 0,
418 uint64_t AlignInBits = 0,
419 uint32_t AlignInBits = 0,
419420 StringRef UniqueIdentifier = "");
420421
421422 /// Create a temporary forward-declared type.
422423 DICompositeType *createReplaceableCompositeType(
423424 unsigned Tag, StringRef Name, DIScope *Scope, DIFile *F, unsigned Line,
424425 unsigned RuntimeLang = 0, uint64_t SizeInBits = 0,
425 uint64_t AlignInBits = 0, DINode::DIFlags Flags = DINode::FlagFwdDecl,
426 uint32_t AlignInBits = 0, DINode::DIFlags Flags = DINode::FlagFwdDecl,
426427 StringRef UniqueIdentifier = "");
427428
428429 /// Retain DIScope* in a module even if it is not referenced
512512 unsigned Line;
513513 DIFlags Flags;
514514 uint64_t SizeInBits;
515 uint64_t AlignInBits;
516515 uint64_t OffsetInBits;
516 uint32_t AlignInBits;
517517
518518 protected:
519519 DIType(LLVMContext &C, unsigned ID, StorageType Storage, unsigned Tag,
520 unsigned Line, uint64_t SizeInBits, uint64_t AlignInBits,
520 unsigned Line, uint64_t SizeInBits, uint32_t AlignInBits,
521521 uint64_t OffsetInBits, DIFlags Flags, ArrayRef Ops)
522522 : DIScope(C, ID, Storage, Tag, Ops) {
523523 init(Line, SizeInBits, AlignInBits, OffsetInBits, Flags);
524524 }
525525 ~DIType() = default;
526526
527 void init(unsigned Line, uint64_t SizeInBits, uint64_t AlignInBits,
527 void init(unsigned Line, uint64_t SizeInBits, uint32_t AlignInBits,
528528 uint64_t OffsetInBits, DIFlags Flags) {
529529 this->Line = Line;
530530 this->Flags = Flags;
535535
536536 /// Change fields in place.
537537 void mutate(unsigned Tag, unsigned Line, uint64_t SizeInBits,
538 uint64_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags) {
538 uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags) {
539539 assert(isDistinct() && "Only distinct nodes can mutate");
540540 setTag(Tag);
541541 init(Line, SizeInBits, AlignInBits, OffsetInBits, Flags);
613613 unsigned Encoding;
614614
615615 DIBasicType(LLVMContext &C, StorageType Storage, unsigned Tag,
616 uint64_t SizeInBits, uint64_t AlignInBits, unsigned Encoding,
616 uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding,
617617 ArrayRef Ops)
618618 : DIType(C, DIBasicTypeKind, Storage, Tag, 0, SizeInBits, AlignInBits, 0,
619619 FlagZero, Ops),
622622
623623 static DIBasicType *getImpl(LLVMContext &Context, unsigned Tag,
624624 StringRef Name, uint64_t SizeInBits,
625 uint64_t AlignInBits, unsigned Encoding,
625 uint32_t AlignInBits, unsigned Encoding,
626626 StorageType Storage, bool ShouldCreate = true) {
627627 return getImpl(Context, Tag, getCanonicalMDString(Context, Name),
628628 SizeInBits, AlignInBits, Encoding, Storage, ShouldCreate);
629629 }
630630 static DIBasicType *getImpl(LLVMContext &Context, unsigned Tag,
631631 MDString *Name, uint64_t SizeInBits,
632 uint64_t AlignInBits, unsigned Encoding,
632 uint32_t AlignInBits, unsigned Encoding,
633633 StorageType Storage, bool ShouldCreate = true);
634634
635635 TempDIBasicType cloneImpl() const {
642642 (Tag, Name, 0, 0, 0))
643643 DEFINE_MDNODE_GET(DIBasicType,
644644 (unsigned Tag, StringRef Name, uint64_t SizeInBits,
645 uint64_t AlignInBits, unsigned Encoding),
645 uint32_t AlignInBits, unsigned Encoding),
646646 (Tag, Name, SizeInBits, AlignInBits, Encoding))
647647 DEFINE_MDNODE_GET(DIBasicType,
648648 (unsigned Tag, MDString *Name, uint64_t SizeInBits,
649 uint64_t AlignInBits, unsigned Encoding),
649 uint32_t AlignInBits, unsigned Encoding),
650650 (Tag, Name, SizeInBits, AlignInBits, Encoding))
651651
652652 TempDIBasicType clone() const { return cloneImpl(); }
669669 friend class MDNode;
670670
671671 DIDerivedType(LLVMContext &C, StorageType Storage, unsigned Tag,
672 unsigned Line, uint64_t SizeInBits, uint64_t AlignInBits,
672 unsigned Line, uint64_t SizeInBits, uint32_t AlignInBits,
673673 uint64_t OffsetInBits, DIFlags Flags, ArrayRef Ops)
674674 : DIType(C, DIDerivedTypeKind, Storage, Tag, Line, SizeInBits,
675675 AlignInBits, OffsetInBits, Flags, Ops) {}
678678 static DIDerivedType *getImpl(LLVMContext &Context, unsigned Tag,
679679 StringRef Name, DIFile *File, unsigned Line,
680680 DIScopeRef Scope, DITypeRef BaseType,
681 uint64_t SizeInBits, uint64_t AlignInBits,
681 uint64_t SizeInBits, uint32_t AlignInBits,
682682 uint64_t OffsetInBits, DIFlags Flags,
683683 Metadata *ExtraData, StorageType Storage,
684684 bool ShouldCreate = true) {
689689 static DIDerivedType *getImpl(LLVMContext &Context, unsigned Tag,
690690 MDString *Name, Metadata *File, unsigned Line,
691691 Metadata *Scope, Metadata *BaseType,
692 uint64_t SizeInBits, uint64_t AlignInBits,
692 uint64_t SizeInBits, uint32_t AlignInBits,
693693 uint64_t OffsetInBits, DIFlags Flags,
694694 Metadata *ExtraData, StorageType Storage,
695695 bool ShouldCreate = true);
705705 DEFINE_MDNODE_GET(DIDerivedType,
706706 (unsigned Tag, MDString *Name, Metadata *File,
707707 unsigned Line, Metadata *Scope, Metadata *BaseType,
708 uint64_t SizeInBits, uint64_t AlignInBits,
708 uint64_t SizeInBits, uint32_t AlignInBits,
709709 uint64_t OffsetInBits, DIFlags Flags,
710710 Metadata *ExtraData = nullptr),
711711 (Tag, Name, File, Line, Scope, BaseType, SizeInBits,
713713 DEFINE_MDNODE_GET(DIDerivedType,
714714 (unsigned Tag, StringRef Name, DIFile *File, unsigned Line,
715715 DIScopeRef Scope, DITypeRef BaseType, uint64_t SizeInBits,
716 uint64_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags,
717 Metadata *ExtraData = nullptr),
716 uint32_t AlignInBits, uint64_t OffsetInBits,
717 DIFlags Flags, Metadata *ExtraData = nullptr),
718718 (Tag, Name, File, Line, Scope, BaseType, SizeInBits,
719719 AlignInBits, OffsetInBits, Flags, ExtraData))
720720
774774
775775 DICompositeType(LLVMContext &C, StorageType Storage, unsigned Tag,
776776 unsigned Line, unsigned RuntimeLang, uint64_t SizeInBits,
777 uint64_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags,
777 uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags,
778778 ArrayRef Ops)
779779 : DIType(C, DICompositeTypeKind, Storage, Tag, Line, SizeInBits,
780780 AlignInBits, OffsetInBits, Flags, Ops),
783783
784784 /// Change fields in place.
785785 void mutate(unsigned Tag, unsigned Line, unsigned RuntimeLang,
786 uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits,
787 DIFlags Flags) {
786 uint64_t SizeInBits, uint32_t AlignInBits,
787 uint64_t OffsetInBits, DIFlags Flags) {
788788 assert(isDistinct() && "Only distinct nodes can mutate");
789789 assert(getRawIdentifier() && "Only ODR-uniqued nodes should mutate");
790790 this->RuntimeLang = RuntimeLang;
794794 static DICompositeType *
795795 getImpl(LLVMContext &Context, unsigned Tag, StringRef Name, Metadata *File,
796796 unsigned Line, DIScopeRef Scope, DITypeRef BaseType,
797 uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits,
797 uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits,
798798 DIFlags Flags, DINodeArray Elements, unsigned RuntimeLang,
799799 DITypeRef VTableHolder, DITemplateParameterArray TemplateParams,
800800 StringRef Identifier, StorageType Storage, bool ShouldCreate = true) {
807807 static DICompositeType *
808808 getImpl(LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File,
809809 unsigned Line, Metadata *Scope, Metadata *BaseType,
810 uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits,
810 uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits,
811811 DIFlags Flags, Metadata *Elements, unsigned RuntimeLang,
812812 Metadata *VTableHolder, Metadata *TemplateParams,
813813 MDString *Identifier, StorageType Storage, bool ShouldCreate = true);
824824 DEFINE_MDNODE_GET(DICompositeType,
825825 (unsigned Tag, StringRef Name, DIFile *File, unsigned Line,
826826 DIScopeRef Scope, DITypeRef BaseType, uint64_t SizeInBits,
827 uint64_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags,
828 DINodeArray Elements, unsigned RuntimeLang,
827 uint32_t AlignInBits, uint64_t OffsetInBits,
828 DIFlags Flags, DINodeArray Elements, unsigned RuntimeLang,
829829 DITypeRef VTableHolder,
830830 DITemplateParameterArray TemplateParams = nullptr,
831831 StringRef Identifier = ""),
835835 DEFINE_MDNODE_GET(DICompositeType,
836836 (unsigned Tag, MDString *Name, Metadata *File,
837837 unsigned Line, Metadata *Scope, Metadata *BaseType,
838 uint64_t SizeInBits, uint64_t AlignInBits,
838 uint64_t SizeInBits, uint32_t AlignInBits,
839839 uint64_t OffsetInBits, DIFlags Flags, Metadata *Elements,
840840 unsigned RuntimeLang, Metadata *VTableHolder,
841841 Metadata *TemplateParams = nullptr,
856856 static DICompositeType *
857857 getODRType(LLVMContext &Context, MDString &Identifier, unsigned Tag,
858858 MDString *Name, Metadata *File, unsigned Line, Metadata *Scope,
859 Metadata *BaseType, uint64_t SizeInBits, uint64_t AlignInBits,
859 Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits,
860860 uint64_t OffsetInBits, DIFlags Flags, Metadata *Elements,
861861 unsigned RuntimeLang, Metadata *VTableHolder,
862862 Metadata *TemplateParams);
875875 static DICompositeType *
876876 buildODRType(LLVMContext &Context, MDString &Identifier, unsigned Tag,
877877 MDString *Name, Metadata *File, unsigned Line, Metadata *Scope,
878 Metadata *BaseType, uint64_t SizeInBits, uint64_t AlignInBits,
878 Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits,
879879 uint64_t OffsetInBits, DIFlags Flags, Metadata *Elements,
880880 unsigned RuntimeLang, Metadata *VTableHolder,
881881 Metadata *TemplateParams);
38643864 OPTIONAL(tag, DwarfTagField, (dwarf::DW_TAG_base_type)); \
38653865 OPTIONAL(name, MDStringField, ); \
38663866 OPTIONAL(size, MDUnsignedField, (0, UINT64_MAX)); \
3867 OPTIONAL(align, MDUnsignedField, (0, UINT64_MAX)); \
3867 OPTIONAL(align, MDUnsignedField, (0, UINT32_MAX)); \
38683868 OPTIONAL(encoding, DwarfAttEncodingField, );
38693869 PARSE_MD_FIELDS();
38703870 #undef VISIT_MD_FIELDS
38873887 OPTIONAL(scope, MDField, ); \
38883888 REQUIRED(baseType, MDField, ); \
38893889 OPTIONAL(size, MDUnsignedField, (0, UINT64_MAX)); \
3890 OPTIONAL(align, MDUnsignedField, (0, UINT64_MAX)); \
3890 OPTIONAL(align, MDUnsignedField, (0, UINT32_MAX)); \
38913891 OPTIONAL(offset, MDUnsignedField, (0, UINT64_MAX)); \
38923892 OPTIONAL(flags, DIFlagField, ); \
38933893 OPTIONAL(extraData, MDField, );
39103910 OPTIONAL(scope, MDField, ); \
39113911 OPTIONAL(baseType, MDField, ); \
39123912 OPTIONAL(size, MDUnsignedField, (0, UINT64_MAX)); \
3913 OPTIONAL(align, MDUnsignedField, (0, UINT64_MAX)); \
3913 OPTIONAL(align, MDUnsignedField, (0, UINT32_MAX)); \
39143914 OPTIONAL(offset, MDUnsignedField, (0, UINT64_MAX)); \
39153915 OPTIONAL(flags, DIFlagField, ); \
39163916 OPTIONAL(elements, MDField, ); \
24962496 Metadata *Scope = getDITypeRefOrNull(Record[5]);
24972497 Metadata *BaseType = getDITypeRefOrNull(Record[6]);
24982498 uint64_t SizeInBits = Record[7];
2499 uint64_t AlignInBits = Record[8];
2499 if (Record[8] > (uint64_t)std::numeric_limits::max())
2500 return error("Alignment value is too large");
2501 uint32_t AlignInBits = Record[8];
25002502 uint64_t OffsetInBits = Record[9];
25012503 DINode::DIFlags Flags = static_cast(Record[10]);
25022504 Metadata *Elements = getMDOrNull(Record[11]);
14031403 addUInt(MemberDie, dwarf::DW_AT_bit_size, None, Size);
14041404
14051405 uint64_t Offset = DT->getOffsetInBits();
1406 uint64_t Align = DT->getAlignInBits() ? DT->getAlignInBits() : FieldSize;
1407 uint64_t AlignMask = ~(Align - 1);
1406 uint32_t Align = DT->getAlignInBits() ? DT->getAlignInBits()
1407 : FieldSize;
1408 uint32_t AlignMask = ~(Align - 1);
14081409 // The bits from the start of the storage unit to the start of the field.
14091410 uint64_t StartBitOffset = Offset - (Offset & AlignMask);
14101411 // The byte offset of the field's aligned storage unit inside the struct.
194194 }
195195
196196 DIBasicType *DIBuilder::createBasicType(StringRef Name, uint64_t SizeInBits,
197 uint64_t AlignInBits,
197 uint32_t AlignInBits,
198198 unsigned Encoding) {
199199 assert(!Name.empty() && "Unable to create type without name");
200200 return DIBasicType::get(VMContext, dwarf::DW_TAG_base_type, Name, SizeInBits,
208208
209209 DIDerivedType *DIBuilder::createPointerType(DIType *PointeeTy,
210210 uint64_t SizeInBits,
211 uint64_t AlignInBits,
211 uint32_t AlignInBits,
212212 StringRef Name) {
213213 // FIXME: Why is there a name here?
214214 return DIDerivedType::get(VMContext, dwarf::DW_TAG_pointer_type, Name,
219219 DIDerivedType *DIBuilder::createMemberPointerType(DIType *PointeeTy,
220220 DIType *Base,
221221 uint64_t SizeInBits,
222 uint64_t AlignInBits,
222 uint32_t AlignInBits,
223223 DINode::DIFlags Flags) {
224224 return DIDerivedType::get(VMContext, dwarf::DW_TAG_ptr_to_member_type, "",
225225 nullptr, 0, nullptr, PointeeTy, SizeInBits,
228228
229229 DIDerivedType *DIBuilder::createReferenceType(unsigned Tag, DIType *RTy,
230230 uint64_t SizeInBits,
231 uint64_t AlignInBits) {
231 uint32_t AlignInBits) {
232232 assert(RTy && "Unable to create reference type");
233233 return DIDerivedType::get(VMContext, Tag, "", nullptr, 0, nullptr, RTy,
234234 SizeInBits, AlignInBits, 0, DINode::FlagZero);
260260 DIDerivedType *DIBuilder::createMemberType(DIScope *Scope, StringRef Name,
261261 DIFile *File, unsigned LineNumber,
262262 uint64_t SizeInBits,
263 uint64_t AlignInBits,
263 uint32_t AlignInBits,
264264 uint64_t OffsetInBits,
265265 DINode::DIFlags Flags, DIType *Ty) {
266266 return DIDerivedType::get(VMContext, dwarf::DW_TAG_member, Name, File,
276276
277277 DIDerivedType *DIBuilder::createBitFieldMemberType(
278278 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
279 uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits,
279 uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits,
280280 uint64_t StorageOffsetInBits, DINode::DIFlags Flags, DIType *Ty) {
281281 Flags |= DINode::FlagBitField;
282282 return DIDerivedType::get(
298298
299299 DIDerivedType *
300300 DIBuilder::createObjCIVar(StringRef Name, DIFile *File, unsigned LineNumber,
301 uint64_t SizeInBits, uint64_t AlignInBits,
301 uint64_t SizeInBits, uint32_t AlignInBits,
302302 uint64_t OffsetInBits, DINode::DIFlags Flags,
303303 DIType *Ty, MDNode *PropertyNode) {
304304 return DIDerivedType::get(VMContext, dwarf::DW_TAG_member, Name, File,
356356
357357 DICompositeType *DIBuilder::createClassType(
358358 DIScope *Context, StringRef Name, DIFile *File, unsigned LineNumber,
359 uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits,
359 uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits,
360360 DINode::DIFlags Flags, DIType *DerivedFrom, DINodeArray Elements,
361361 DIType *VTableHolder, MDNode *TemplateParams, StringRef UniqueIdentifier) {
362362 assert((!Context || isa(Context)) &&
373373
374374 DICompositeType *DIBuilder::createStructType(
375375 DIScope *Context, StringRef Name, DIFile *File, unsigned LineNumber,
376 uint64_t SizeInBits, uint64_t AlignInBits, DINode::DIFlags Flags,
376 uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags,
377377 DIType *DerivedFrom, DINodeArray Elements, unsigned RunTimeLang,
378378 DIType *VTableHolder, StringRef UniqueIdentifier) {
379379 auto *R = DICompositeType::get(
386386
387387 DICompositeType *DIBuilder::createUnionType(
388388 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
389 uint64_t SizeInBits, uint64_t AlignInBits, DINode::DIFlags Flags,
389 uint64_t SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags,
390390 DINodeArray Elements, unsigned RunTimeLang, StringRef UniqueIdentifier) {
391391 auto *R = DICompositeType::get(
392392 VMContext, dwarf::DW_TAG_union_type, Name, File, LineNumber,
412412
413413 DICompositeType *DIBuilder::createEnumerationType(
414414 DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
415 uint64_t SizeInBits, uint64_t AlignInBits, DINodeArray Elements,
415 uint64_t SizeInBits, uint32_t AlignInBits, DINodeArray Elements,
416416 DIType *UnderlyingType, StringRef UniqueIdentifier) {
417417 auto *CTy = DICompositeType::get(
418418 VMContext, dwarf::DW_TAG_enumeration_type, Name, File, LineNumber,
423423 return CTy;
424424 }
425425
426 DICompositeType *DIBuilder::createArrayType(uint64_t Size, uint64_t AlignInBits,
427 DIType *Ty,
426 DICompositeType *DIBuilder::createArrayType(uint64_t Size,
427 uint32_t AlignInBits, DIType *Ty,
428428 DINodeArray Subscripts) {
429429 auto *R = DICompositeType::get(VMContext, dwarf::DW_TAG_array_type, "",
430430 nullptr, 0, nullptr, Ty, Size, AlignInBits, 0,
434434 }
435435
436436 DICompositeType *DIBuilder::createVectorType(uint64_t Size,
437 uint64_t AlignInBits, DIType *Ty,
437 uint32_t AlignInBits, DIType *Ty,
438438 DINodeArray Subscripts) {
439439 auto *R = DICompositeType::get(VMContext, dwarf::DW_TAG_array_type, "",
440440 nullptr, 0, nullptr, Ty, Size, AlignInBits, 0,
478478 DICompositeType *
479479 DIBuilder::createForwardDecl(unsigned Tag, StringRef Name, DIScope *Scope,
480480 DIFile *F, unsigned Line, unsigned RuntimeLang,
481 uint64_t SizeInBits, uint64_t AlignInBits,
481 uint64_t SizeInBits, uint32_t AlignInBits,
482482 StringRef UniqueIdentifier) {
483483 // FIXME: Define in terms of createReplaceableForwardDecl() by calling
484484 // replaceWithUniqued().
492492
493493 DICompositeType *DIBuilder::createReplaceableCompositeType(
494494 unsigned Tag, StringRef Name, DIScope *Scope, DIFile *F, unsigned Line,
495 unsigned RuntimeLang, uint64_t SizeInBits, uint64_t AlignInBits,
495 unsigned RuntimeLang, uint64_t SizeInBits, uint32_t AlignInBits,
496496 DINode::DIFlags Flags, StringRef UniqueIdentifier) {
497497 auto *RetTy =
498498 DICompositeType::getTemporary(
226226
227227 DIBasicType *DIBasicType::getImpl(LLVMContext &Context, unsigned Tag,
228228 MDString *Name, uint64_t SizeInBits,
229 uint64_t AlignInBits, unsigned Encoding,
229 uint32_t AlignInBits, unsigned Encoding,
230230 StorageType Storage, bool ShouldCreate) {
231231 assert(isCanonical(Name) && "Expected canonical MDString");
232232 DEFINE_GETIMPL_LOOKUP(DIBasicType,
239239 DIDerivedType *DIDerivedType::getImpl(
240240 LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File,
241241 unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits,
242 uint64_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags,
242 uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags,
243243 Metadata *ExtraData, StorageType Storage, bool ShouldCreate) {
244244 assert(isCanonical(Name) && "Expected canonical MDString");
245245 DEFINE_GETIMPL_LOOKUP(DIDerivedType,
254254 DICompositeType *DICompositeType::getImpl(
255255 LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File,
256256 unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits,
257 uint64_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags,
257 uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags,
258258 Metadata *Elements, unsigned RuntimeLang, Metadata *VTableHolder,
259259 Metadata *TemplateParams, MDString *Identifier, StorageType Storage,
260260 bool ShouldCreate) {
275275 DICompositeType *DICompositeType::buildODRType(
276276 LLVMContext &Context, MDString &Identifier, unsigned Tag, MDString *Name,
277277 Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType,
278 uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits,
278 uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits,
279279 DIFlags Flags, Metadata *Elements, unsigned RuntimeLang,
280280 Metadata *VTableHolder, Metadata *TemplateParams) {
281281 assert(!Identifier.getString().empty() && "Expected valid identifier");
309309 DICompositeType *DICompositeType::getODRType(
310310 LLVMContext &Context, MDString &Identifier, unsigned Tag, MDString *Name,
311311 Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType,
312 uint64_t SizeInBits, uint64_t AlignInBits, uint64_t OffsetInBits,
312 uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits,
313313 DIFlags Flags, Metadata *Elements, unsigned RuntimeLang,
314314 Metadata *VTableHolder, Metadata *TemplateParams) {
315315 assert(!Identifier.getString().empty() && "Expected valid identifier");
318318 unsigned Tag;
319319 MDString *Name;
320320 uint64_t SizeInBits;
321 uint64_t AlignInBits;
321 uint32_t AlignInBits;
322322 unsigned Encoding;
323323
324324 MDNodeKeyImpl(unsigned Tag, MDString *Name, uint64_t SizeInBits,
325 uint64_t AlignInBits, unsigned Encoding)
325 uint32_t AlignInBits, unsigned Encoding)
326326 : Tag(Tag), Name(Name), SizeInBits(SizeInBits), AlignInBits(AlignInBits),
327327 Encoding(Encoding) {}
328328 MDNodeKeyImpl(const DIBasicType *N)
348348 Metadata *Scope;
349349 Metadata *BaseType;
350350 uint64_t SizeInBits;
351 uint64_t AlignInBits;
352351 uint64_t OffsetInBits;
352 uint32_t AlignInBits;
353353 unsigned Flags;
354354 Metadata *ExtraData;
355355
356356 MDNodeKeyImpl(unsigned Tag, MDString *Name, Metadata *File, unsigned Line,
357357 Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits,
358 uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags,
358 uint32_t AlignInBits, uint64_t OffsetInBits, unsigned Flags,
359359 Metadata *ExtraData)
360360 : Tag(Tag), Name(Name), File(File), Line(Line), Scope(Scope),
361 BaseType(BaseType), SizeInBits(SizeInBits), AlignInBits(AlignInBits),
362 OffsetInBits(OffsetInBits), Flags(Flags), ExtraData(ExtraData) {}
361 BaseType(BaseType), SizeInBits(SizeInBits), OffsetInBits(OffsetInBits),
362 AlignInBits(AlignInBits), Flags(Flags), ExtraData(ExtraData) {}
363363 MDNodeKeyImpl(const DIDerivedType *N)
364364 : Tag(N->getTag()), Name(N->getRawName()), File(N->getRawFile()),
365365 Line(N->getLine()), Scope(N->getRawScope()),
366366 BaseType(N->getRawBaseType()), SizeInBits(N->getSizeInBits()),
367 AlignInBits(N->getAlignInBits()), OffsetInBits(N->getOffsetInBits()),
367 OffsetInBits(N->getOffsetInBits()), AlignInBits(N->getAlignInBits()),
368368 Flags(N->getFlags()), ExtraData(N->getRawExtraData()) {}
369369
370370 bool isKeyOf(const DIDerivedType *RHS) const {
429429 Metadata *Scope;
430430 Metadata *BaseType;
431431 uint64_t SizeInBits;
432 uint64_t AlignInBits;
433432 uint64_t OffsetInBits;
433 uint32_t AlignInBits;
434434 unsigned Flags;
435435 Metadata *Elements;
436436 unsigned RuntimeLang;
440440
441441 MDNodeKeyImpl(unsigned Tag, MDString *Name, Metadata *File, unsigned Line,
442442 Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits,
443 uint64_t AlignInBits, uint64_t OffsetInBits, unsigned Flags,
443 uint32_t AlignInBits, uint64_t OffsetInBits, unsigned Flags,
444444 Metadata *Elements, unsigned RuntimeLang,
445445 Metadata *VTableHolder, Metadata *TemplateParams,
446446 MDString *Identifier)
447447 : Tag(Tag), Name(Name), File(File), Line(Line), Scope(Scope),
448 BaseType(BaseType), SizeInBits(SizeInBits), AlignInBits(AlignInBits),
449 OffsetInBits(OffsetInBits), Flags(Flags), Elements(Elements),
448 BaseType(BaseType), SizeInBits(SizeInBits), OffsetInBits(OffsetInBits),
449 AlignInBits(AlignInBits), Flags(Flags), Elements(Elements),
450450 RuntimeLang(RuntimeLang), VTableHolder(VTableHolder),
451451 TemplateParams(TemplateParams), Identifier(Identifier) {}
452452 MDNodeKeyImpl(const DICompositeType *N)
453453 : Tag(N->getTag()), Name(N->getRawName()), File(N->getRawFile()),
454454 Line(N->getLine()), Scope(N->getRawScope()),
455455 BaseType(N->getRawBaseType()), SizeInBits(N->getSizeInBits()),
456 AlignInBits(N->getAlignInBits()), OffsetInBits(N->getOffsetInBits()),
456 OffsetInBits(N->getOffsetInBits()), AlignInBits(N->getAlignInBits()),
457457 Flags(N->getFlags()), Elements(N->getRawElements()),
458458 RuntimeLang(N->getRuntimeLang()), VTableHolder(N->getRawVTableHolder()),
459459 TemplateParams(N->getRawTemplateParams()),
33 ; CHECK: !named = !{!0, !1, !2}
44 !named = !{!0, !1, !2}
55
6 ; CHECK: !0 = !DIBasicType(name: "name", size: 18446744073709551615, align: 18446744073709551614, encoding: DW_ATE_unsigned_char)
7 ; CHECK-NEXT: !1 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !0, size: 18446744073709551615, align: 18446744073709551614, offset: 18446744073709551613)
8 ; CHECK-NEXT: !2 = !DICompositeType(tag: DW_TAG_array_type, baseType: !0, size: 18446744073709551615, align: 18446744073709551614, offset: 18446744073709551613)
9 !0 = !DIBasicType(tag: DW_TAG_base_type, name: "name", size: 18446744073709551615, align: 18446744073709551614, encoding: DW_ATE_unsigned_char)
10 !1 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !0, size: 18446744073709551615, align: 18446744073709551614, offset: 18446744073709551613)
11 !2 = !DICompositeType(tag: DW_TAG_array_type, baseType: !0, size: 18446744073709551615, align: 18446744073709551614, offset: 18446744073709551613)
6 ; CHECK: !0 = !DIBasicType(name: "name", size: 18446744073709551615, align: 4294967294, encoding: DW_ATE_unsigned_char)
7 ; CHECK-NEXT: !1 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !0, size: 18446744073709551615, align: 4294967294, offset: 18446744073709551613)
8 ; CHECK-NEXT: !2 = !DICompositeType(tag: DW_TAG_array_type, baseType: !0, size: 18446744073709551615, align: 4294967294, offset: 18446744073709551613)
9 !0 = !DIBasicType(tag: DW_TAG_base_type, name: "name", size: 18446744073709551615, align: 4294967294, encoding: DW_ATE_unsigned_char)
10 !1 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !0, size: 18446744073709551615, align: 4294967294, offset: 18446744073709551613)
11 !2 = !DICompositeType(tag: DW_TAG_array_type, baseType: !0, size: 18446744073709551615, align: 4294967294, offset: 18446744073709551613)
996996
997997 TEST_F(DIBasicTypeTest, getWithLargeValues) {
998998 auto *N = DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special",
999 UINT64_MAX, UINT64_MAX - 1, 7);
999 UINT64_MAX, UINT32_MAX - 1, 7);
10001000 EXPECT_EQ(UINT64_MAX, N->getSizeInBits());
1001 EXPECT_EQ(UINT64_MAX - 1, N->getAlignInBits());
1001 EXPECT_EQ(UINT32_MAX - 1, N->getAlignInBits());
10021002 }
10031003
10041004 TEST_F(DIBasicTypeTest, getUnspecified) {
11201120
11211121 auto *N = DIDerivedType::get(
11221122 Context, dwarf::DW_TAG_pointer_type, "something", File, 1, Scope,
1123 BaseType, UINT64_MAX, UINT64_MAX - 1, UINT64_MAX - 2, Flags, ExtraData);
1123 BaseType, UINT64_MAX, UINT32_MAX - 1, UINT64_MAX - 2, Flags, ExtraData);
11241124 EXPECT_EQ(UINT64_MAX, N->getSizeInBits());
1125 EXPECT_EQ(UINT64_MAX - 1, N->getAlignInBits());
1125 EXPECT_EQ(UINT32_MAX - 1, N->getAlignInBits());
11261126 EXPECT_EQ(UINT64_MAX - 2, N->getOffsetInBits());
11271127 }
11281128
11361136 DIScope *Scope = getSubprogram();
11371137 DIType *BaseType = getCompositeType();
11381138 uint64_t SizeInBits = 2;
1139 uint64_t AlignInBits = 3;
1139 uint32_t AlignInBits = 3;
11401140 uint64_t OffsetInBits = 4;
11411141 DINode::DIFlags Flags = static_cast(5);
11421142 MDTuple *Elements = getTuple();
12561256 DIScope *Scope = getSubprogram();
12571257 DIType *BaseType = getCompositeType();
12581258 uint64_t SizeInBits = UINT64_MAX;
1259 uint64_t AlignInBits = UINT64_MAX - 1;
1259 uint32_t AlignInBits = UINT32_MAX - 1;
12601260 uint64_t OffsetInBits = UINT64_MAX - 2;
12611261 DINode::DIFlags Flags = static_cast(5);
12621262 MDTuple *Elements = getTuple();
12821282 DIScope *Scope = getSubprogram();
12831283 DIType *BaseType = getCompositeType();
12841284 uint64_t SizeInBits = 2;
1285 uint64_t AlignInBits = 3;
1285 uint32_t AlignInBits = 3;
12861286 uint64_t OffsetInBits = 4;
12871287 DINode::DIFlags Flags = static_cast(5);
12881288 unsigned RuntimeLang = 6;