llvm.org GIT mirror llvm / 2cee5cc
[DebugInfo] Emit address space with DW_AT_address_class attribute for pointer and reference types Differential Revision: https://reviews.llvm.org/D29670 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297320 91177308-0d34-0410-b5e6-96231b3b80d8 Konstantin Zhuravlyov 3 years ago
29 changed file(s) with 416 addition(s) and 88 deletion(s). Raw diff Collapse all Expand all
118118 const char *Name) {
119119 DIBuilder *D = unwrap(Dref);
120120 return wrap(D->createPointerType(unwrap(PointeeType), SizeInBits,
121 AlignInBits, Name));
121 AlignInBits, /* DWARFAddressSpace */ None,
122 Name));
122123 }
123124
124125 LLVMMetadataRef
1818
1919 The AMDGPU back-end uses the following address space mapping:
2020
21 ============= ============================================
22 Address Space Memory Space
23 ============= ============================================
24 0 Private
25 1 Global
26 2 Constant
27 3 Local
28 4 Generic (Flat)
29 5 Region
30 ============= ============================================
21 ================== =================== ==============
22 LLVM Address Space DWARF Address Space Memory Space
23 ================== =================== ==============
24 0 1 Private
25 1 N/A Global
26 2 N/A Constant
27 3 2 Local
28 4 N/A Generic (Flat)
29 5 N/A Region
30 ================== =================== ==============
3131
3232 The terminology in the table, aside from the region memory space, is from the
3333 OpenCL standard.
34
35 LLVM Address Space is used throughout LLVM (for example, in LLVM IR). DWARF
36 Address Space is emitted in DWARF, and is used by tools, such as debugger,
37 profiler and others.
3438
3539 Trap Handler ABI
3640 ----------------
167167 DIDerivedType *createQualifiedType(unsigned Tag, DIType *FromTy);
168168
169169 /// Create debugging information entry for a pointer.
170 /// \param PointeeTy Type pointed by this pointer.
171 /// \param SizeInBits Size.
172 /// \param AlignInBits Alignment. (optional)
173 /// \param Name Pointer type name. (optional)
170 /// \param PointeeTy Type pointed by this pointer.
171 /// \param SizeInBits Size.
172 /// \param AlignInBits Alignment. (optional)
173 /// \param DWARFAddressSpace DWARF address space. (optional)
174 /// \param Name Pointer type name. (optional)
174175 DIDerivedType *createPointerType(DIType *PointeeTy, uint64_t SizeInBits,
175176 uint32_t AlignInBits = 0,
177 Optional DWARFAddressSpace =
178 None,
176179 StringRef Name = "");
177180
178181 /// Create debugging information entry for a pointer to member.
189192 /// style reference or rvalue reference type.
190193 DIDerivedType *createReferenceType(unsigned Tag, DIType *RTy,
191194 uint64_t SizeInBits = 0,
192 uint32_t AlignInBits = 0);
195 uint32_t AlignInBits = 0,
196 Optional DWARFAddressSpace =
197 None);
193198
194199 /// Create debugging information entry for a typedef.
195200 /// \param Ty Original type.
709709 friend class LLVMContextImpl;
710710 friend class MDNode;
711711
712 /// \brief The DWARF address space of the memory pointed to or referenced by a
713 /// pointer or reference type respectively.
714 Optional DWARFAddressSpace;
715
712716 DIDerivedType(LLVMContext &C, StorageType Storage, unsigned Tag,
713717 unsigned Line, uint64_t SizeInBits, uint32_t AlignInBits,
714 uint64_t OffsetInBits, DIFlags Flags, ArrayRef Ops)
718 uint64_t OffsetInBits, Optional DWARFAddressSpace,
719 DIFlags Flags, ArrayRef Ops)
715720 : DIType(C, DIDerivedTypeKind, Storage, Tag, Line, SizeInBits,
716 AlignInBits, OffsetInBits, Flags, Ops) {}
721 AlignInBits, OffsetInBits, Flags, Ops),
722 DWARFAddressSpace(DWARFAddressSpace) {}
717723 ~DIDerivedType() = default;
718724
719725 static DIDerivedType *getImpl(LLVMContext &Context, unsigned Tag,
720726 StringRef Name, DIFile *File, unsigned Line,
721727 DIScopeRef Scope, DITypeRef BaseType,
722728 uint64_t SizeInBits, uint32_t AlignInBits,
723 uint64_t OffsetInBits, DIFlags Flags,
724 Metadata *ExtraData, StorageType Storage,
725 bool ShouldCreate = true) {
729 uint64_t OffsetInBits,
730 Optional DWARFAddressSpace,
731 DIFlags Flags, Metadata *ExtraData,
732 StorageType Storage, bool ShouldCreate = true) {
726733 return getImpl(Context, Tag, getCanonicalMDString(Context, Name), File,
727734 Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits,
728 Flags, ExtraData, Storage, ShouldCreate);
735 DWARFAddressSpace, Flags, ExtraData, Storage, ShouldCreate);
729736 }
730737 static DIDerivedType *getImpl(LLVMContext &Context, unsigned Tag,
731738 MDString *Name, Metadata *File, unsigned Line,
732739 Metadata *Scope, Metadata *BaseType,
733740 uint64_t SizeInBits, uint32_t AlignInBits,
734 uint64_t OffsetInBits, DIFlags Flags,
735 Metadata *ExtraData, StorageType Storage,
736 bool ShouldCreate = true);
741 uint64_t OffsetInBits,
742 Optional DWARFAddressSpace,
743 DIFlags Flags, Metadata *ExtraData,
744 StorageType Storage, bool ShouldCreate = true);
737745
738746 TempDIDerivedType cloneImpl() const {
739747 return getTemporary(getContext(), getTag(), getName(), getFile(), getLine(),
740748 getScope(), getBaseType(), getSizeInBits(),
741 getAlignInBits(), getOffsetInBits(), getFlags(),
742 getExtraData());
749 getAlignInBits(), getOffsetInBits(),
750 getDWARFAddressSpace(), getFlags(), getExtraData());
743751 }
744752
745753 public:
747755 (unsigned Tag, MDString *Name, Metadata *File,
748756 unsigned Line, Metadata *Scope, Metadata *BaseType,
749757 uint64_t SizeInBits, uint32_t AlignInBits,
750 uint64_t OffsetInBits, DIFlags Flags,
758 uint64_t OffsetInBits,
759 Optional DWARFAddressSpace, DIFlags Flags,
751760 Metadata *ExtraData = nullptr),
752761 (Tag, Name, File, Line, Scope, BaseType, SizeInBits,
753 AlignInBits, OffsetInBits, Flags, ExtraData))
762 AlignInBits, OffsetInBits, DWARFAddressSpace, Flags,
763 ExtraData))
754764 DEFINE_MDNODE_GET(DIDerivedType,
755765 (unsigned Tag, StringRef Name, DIFile *File, unsigned Line,
756766 DIScopeRef Scope, DITypeRef BaseType, uint64_t SizeInBits,
757767 uint32_t AlignInBits, uint64_t OffsetInBits,
758 DIFlags Flags, Metadata *ExtraData = nullptr),
768 Optional DWARFAddressSpace, DIFlags Flags,
769 Metadata *ExtraData = nullptr),
759770 (Tag, Name, File, Line, Scope, BaseType, SizeInBits,
760 AlignInBits, OffsetInBits, Flags, ExtraData))
771 AlignInBits, OffsetInBits, DWARFAddressSpace, Flags,
772 ExtraData))
761773
762774 TempDIDerivedType clone() const { return cloneImpl(); }
763775
764 //// Get the base type this is derived from.
776 /// Get the base type this is derived from.
765777 DITypeRef getBaseType() const { return DITypeRef(getRawBaseType()); }
766778 Metadata *getRawBaseType() const { return getOperand(3); }
779
780 /// \returns The DWARF address space of the memory pointed to or referenced by
781 /// a pointer or reference type respectively.
782 Optional getDWARFAddressSpace() const { return DWARFAddressSpace; }
767783
768784 /// Get extra data associated with this derived type.
769785 ///
39073907 /// ParseDIDerivedType:
39083908 /// ::= !DIDerivedType(tag: DW_TAG_pointer_type, name: "int", file: !0,
39093909 /// line: 7, scope: !1, baseType: !2, size: 32,
3910 /// align: 32, offset: 0, flags: 0, extraData: !3)
3910 /// align: 32, offset: 0, flags: 0, extraData: !3,
3911 /// dwarfAddressSpace: 3)
39113912 bool LLParser::ParseDIDerivedType(MDNode *&Result, bool IsDistinct) {
39123913 #define VISIT_MD_FIELDS(OPTIONAL, REQUIRED) \
39133914 REQUIRED(tag, DwarfTagField, ); \
39203921 OPTIONAL(align, MDUnsignedField, (0, UINT32_MAX)); \
39213922 OPTIONAL(offset, MDUnsignedField, (0, UINT64_MAX)); \
39223923 OPTIONAL(flags, DIFlagField, ); \
3923 OPTIONAL(extraData, MDField, );
3924 OPTIONAL(extraData, MDField, ); \
3925 OPTIONAL(dwarfAddressSpace, MDUnsignedField, (UINT32_MAX, UINT32_MAX));
39243926 PARSE_MD_FIELDS();
39253927 #undef VISIT_MD_FIELDS
3928
3929 Optional DWARFAddressSpace;
3930 if (dwarfAddressSpace.Val != UINT32_MAX)
3931 DWARFAddressSpace = dwarfAddressSpace.Val;
39263932
39273933 Result = GET_OR_DISTINCT(DIDerivedType,
39283934 (Context, tag.Val, name.Val, file.Val, line.Val,
39293935 scope.Val, baseType.Val, size.Val, align.Val,
3930 offset.Val, flags.Val, extraData.Val));
3936 offset.Val, DWARFAddressSpace, flags.Val,
3937 extraData.Val));
39313938 return false;
39323939 }
39333940
11091109 break;
11101110 }
11111111 case bitc::METADATA_DERIVED_TYPE: {
1112 if (Record.size() != 12)
1113 return error("Invalid record");
1112 if (Record.size() < 12 || Record.size() > 13)
1113 return error("Invalid record");
1114
1115 // DWARF address space is encoded as N->getDWARFAddressSpace() + 1. 0 means
1116 // that there is no DWARF address space associated with DIDerivedType.
1117 Optional DWARFAddressSpace;
1118 if (Record.size() > 12 && Record[12])
1119 DWARFAddressSpace = Record[12] - 1;
11141120
11151121 IsDistinct = Record[0];
11161122 DINode::DIFlags Flags = static_cast(Record[10]);
11201126 getMDOrNull(Record[3]), Record[4],
11211127 getDITypeRefOrNull(Record[5]),
11221128 getDITypeRefOrNull(Record[6]), Record[7], Record[8],
1123 Record[9], Flags, getDITypeRefOrNull(Record[11]))),
1129 Record[9], DWARFAddressSpace, Flags,
1130 getDITypeRefOrNull(Record[11]))),
11241131 NextMetadataNo);
11251132 NextMetadataNo++;
11261133 break;
14721472 Record.push_back(N->getFlags());
14731473 Record.push_back(VE.getMetadataOrNullID(N->getExtraData()));
14741474
1475 // DWARF address space is encoded as N->getDWARFAddressSpace() + 1. 0 means
1476 // that there is no DWARF address space associated with DIDerivedType.
1477 if (const auto &DWARFAddressSpace = N->getDWARFAddressSpace())
1478 Record.push_back(*DWARFAddressSpace + 1);
1479 else
1480 Record.push_back(0);
1481
14751482 Stream.EmitRecord(bitc::METADATA_DERIVED_TYPE, Record, Abbrev);
14761483 Record.clear();
14771484 }
852852 // Add source line info if available and TyDesc is not a forward declaration.
853853 if (!DTy->isForwardDecl())
854854 addSourceLine(Buffer, DTy);
855
856 // If DWARF address space value is other than None, add it for pointer and
857 // reference types as DW_AT_address_class.
858 if (DTy->getDWARFAddressSpace() && (Tag == dwarf::DW_TAG_pointer_type ||
859 Tag == dwarf::DW_TAG_reference_type))
860 addUInt(Buffer, dwarf::DW_AT_address_class, dwarf::DW_FORM_data4,
861 DTy->getDWARFAddressSpace().getValue());
855862 }
856863
857864 void DwarfUnit::constructSubprogramArguments(DIE &Buffer, DITypeRefArray Args) {
16131613 Printer.printInt("offset", N->getOffsetInBits());
16141614 Printer.printDIFlags("flags", N->getFlags());
16151615 Printer.printMetadata("extraData", N->getRawExtraData());
1616 if (const auto &DWARFAddressSpace = N->getDWARFAddressSpace())
1617 Printer.printInt("dwarfAddressSpace", *DWARFAddressSpace,
1618 /* ShouldSkipZero */ false);
16161619 Out << ")";
16171620 }
16181621
240240
241241 DIDerivedType *DIBuilder::createQualifiedType(unsigned Tag, DIType *FromTy) {
242242 return DIDerivedType::get(VMContext, Tag, "", nullptr, 0, nullptr, FromTy, 0,
243 0, 0, DINode::FlagZero);
244 }
245
246 DIDerivedType *DIBuilder::createPointerType(DIType *PointeeTy,
247 uint64_t SizeInBits,
248 uint32_t AlignInBits,
249 StringRef Name) {
243 0, 0, None, DINode::FlagZero);
244 }
245
246 DIDerivedType *DIBuilder::createPointerType(
247 DIType *PointeeTy,
248 uint64_t SizeInBits,
249 uint32_t AlignInBits,
250 Optional DWARFAddressSpace,
251 StringRef Name) {
250252 // FIXME: Why is there a name here?
251253 return DIDerivedType::get(VMContext, dwarf::DW_TAG_pointer_type, Name,
252254 nullptr, 0, nullptr, PointeeTy, SizeInBits,
253 AlignInBits, 0, DINode::FlagZero);
255 AlignInBits, 0, DWARFAddressSpace,
256 DINode::FlagZero);
254257 }
255258
256259 DIDerivedType *DIBuilder::createMemberPointerType(DIType *PointeeTy,
260263 DINode::DIFlags Flags) {
261264 return DIDerivedType::get(VMContext, dwarf::DW_TAG_ptr_to_member_type, "",
262265 nullptr, 0, nullptr, PointeeTy, SizeInBits,
263 AlignInBits, 0, Flags, Base);
264 }
265
266 DIDerivedType *DIBuilder::createReferenceType(unsigned Tag, DIType *RTy,
267 uint64_t SizeInBits,
268 uint32_t AlignInBits) {
266 AlignInBits, 0, None, Flags, Base);
267 }
268
269 DIDerivedType *DIBuilder::createReferenceType(
270 unsigned Tag, DIType *RTy,
271 uint64_t SizeInBits,
272 uint32_t AlignInBits,
273 Optional DWARFAddressSpace) {
269274 assert(RTy && "Unable to create reference type");
270275 return DIDerivedType::get(VMContext, Tag, "", nullptr, 0, nullptr, RTy,
271 SizeInBits, AlignInBits, 0, DINode::FlagZero);
276 SizeInBits, AlignInBits, 0, DWARFAddressSpace,
277 DINode::FlagZero);
272278 }
273279
274280 DIDerivedType *DIBuilder::createTypedef(DIType *Ty, StringRef Name,
276282 DIScope *Context) {
277283 return DIDerivedType::get(VMContext, dwarf::DW_TAG_typedef, Name, File,
278284 LineNo, getNonCompileUnitScope(Context), Ty, 0, 0,
279 0, DINode::FlagZero);
285 0, None, DINode::FlagZero);
280286 }
281287
282288 DIDerivedType *DIBuilder::createFriend(DIType *Ty, DIType *FriendTy) {
283289 assert(Ty && "Invalid type!");
284290 assert(FriendTy && "Invalid friend type!");
285291 return DIDerivedType::get(VMContext, dwarf::DW_TAG_friend, "", nullptr, 0, Ty,
286 FriendTy, 0, 0, 0, DINode::FlagZero);
292 FriendTy, 0, 0, 0, None, DINode::FlagZero);
287293 }
288294
289295 DIDerivedType *DIBuilder::createInheritance(DIType *Ty, DIType *BaseTy,
291297 DINode::DIFlags Flags) {
292298 assert(Ty && "Unable to create inheritance");
293299 return DIDerivedType::get(VMContext, dwarf::DW_TAG_inheritance, "", nullptr,
294 0, Ty, BaseTy, 0, 0, BaseOffset, Flags);
300 0, Ty, BaseTy, 0, 0, BaseOffset, None, Flags);
295301 }
296302
297303 DIDerivedType *DIBuilder::createMemberType(DIScope *Scope, StringRef Name,
302308 DINode::DIFlags Flags, DIType *Ty) {
303309 return DIDerivedType::get(VMContext, dwarf::DW_TAG_member, Name, File,
304310 LineNumber, getNonCompileUnitScope(Scope), Ty,
305 SizeInBits, AlignInBits, OffsetInBits, Flags);
311 SizeInBits, AlignInBits, OffsetInBits, None, Flags);
306312 }
307313
308314 static ConstantAsMetadata *getConstantOrNull(Constant *C) {
319325 return DIDerivedType::get(
320326 VMContext, dwarf::DW_TAG_member, Name, File, LineNumber,
321327 getNonCompileUnitScope(Scope), Ty, SizeInBits, /* AlignInBits */ 0,
322 OffsetInBits, Flags,
328 OffsetInBits, None, Flags,
323329 ConstantAsMetadata::get(ConstantInt::get(IntegerType::get(VMContext, 64),
324330 StorageOffsetInBits)));
325331 }
332338 Flags |= DINode::FlagStaticMember;
333339 return DIDerivedType::get(VMContext, dwarf::DW_TAG_member, Name, File,
334340 LineNumber, getNonCompileUnitScope(Scope), Ty, 0,
335 AlignInBits, 0, Flags, getConstantOrNull(Val));
341 AlignInBits, 0, None, Flags,
342 getConstantOrNull(Val));
336343 }
337344
338345 DIDerivedType *
342349 DIType *Ty, MDNode *PropertyNode) {
343350 return DIDerivedType::get(VMContext, dwarf::DW_TAG_member, Name, File,
344351 LineNumber, getNonCompileUnitScope(File), Ty,
345 SizeInBits, AlignInBits, OffsetInBits, Flags,
352 SizeInBits, AlignInBits, OffsetInBits, None, Flags,
346353 PropertyNode);
347354 }
348355
244244 DIDerivedType *DIDerivedType::getImpl(
245245 LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File,
246246 unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits,
247 uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags,
248 Metadata *ExtraData, StorageType Storage, bool ShouldCreate) {
247 uint32_t AlignInBits, uint64_t OffsetInBits,
248 Optional DWARFAddressSpace, DIFlags Flags, Metadata *ExtraData,
249 StorageType Storage, bool ShouldCreate) {
249250 assert(isCanonical(Name) && "Expected canonical MDString");
250251 DEFINE_GETIMPL_LOOKUP(DIDerivedType,
251252 (Tag, Name, File, Line, Scope, BaseType, SizeInBits,
252 AlignInBits, OffsetInBits, Flags, ExtraData));
253 AlignInBits, OffsetInBits, DWARFAddressSpace, Flags,
254 ExtraData));
253255 Metadata *Ops[] = {File, Scope, Name, BaseType, ExtraData};
254256 DEFINE_GETIMPL_STORE(
255 DIDerivedType, (Tag, Line, SizeInBits, AlignInBits, OffsetInBits, Flags),
256 Ops);
257 DIDerivedType, (Tag, Line, SizeInBits, AlignInBits, OffsetInBits,
258 DWARFAddressSpace, Flags), Ops);
257259 }
258260
259261 DICompositeType *DICompositeType::getImpl(
351351 uint64_t SizeInBits;
352352 uint64_t OffsetInBits;
353353 uint32_t AlignInBits;
354 Optional DWARFAddressSpace;
354355 unsigned Flags;
355356 Metadata *ExtraData;
356357
357358 MDNodeKeyImpl(unsigned Tag, MDString *Name, Metadata *File, unsigned Line,
358359 Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits,
359 uint32_t AlignInBits, uint64_t OffsetInBits, unsigned Flags,
360 uint32_t AlignInBits, uint64_t OffsetInBits,
361 Optional DWARFAddressSpace, unsigned Flags,
360362 Metadata *ExtraData)
361363 : Tag(Tag), Name(Name), File(File), Line(Line), Scope(Scope),
362364 BaseType(BaseType), SizeInBits(SizeInBits), OffsetInBits(OffsetInBits),
363 AlignInBits(AlignInBits), Flags(Flags), ExtraData(ExtraData) {}
365 AlignInBits(AlignInBits), DWARFAddressSpace(DWARFAddressSpace),
366 Flags(Flags), ExtraData(ExtraData) {}
364367 MDNodeKeyImpl(const DIDerivedType *N)
365368 : Tag(N->getTag()), Name(N->getRawName()), File(N->getRawFile()),
366369 Line(N->getLine()), Scope(N->getRawScope()),
367370 BaseType(N->getRawBaseType()), SizeInBits(N->getSizeInBits()),
368371 OffsetInBits(N->getOffsetInBits()), AlignInBits(N->getAlignInBits()),
369 Flags(N->getFlags()), ExtraData(N->getRawExtraData()) {}
372 DWARFAddressSpace(N->getDWARFAddressSpace()), Flags(N->getFlags()),
373 ExtraData(N->getRawExtraData()) {}
370374
371375 bool isKeyOf(const DIDerivedType *RHS) const {
372376 return Tag == RHS->getTag() && Name == RHS->getRawName() &&
374378 Scope == RHS->getRawScope() && BaseType == RHS->getRawBaseType() &&
375379 SizeInBits == RHS->getSizeInBits() &&
376380 AlignInBits == RHS->getAlignInBits() &&
377 OffsetInBits == RHS->getOffsetInBits() && Flags == RHS->getFlags() &&
381 OffsetInBits == RHS->getOffsetInBits() &&
382 DWARFAddressSpace == RHS->getDWARFAddressSpace() &&
383 Flags == RHS->getFlags() &&
378384 ExtraData == RHS->getRawExtraData();
379385 }
380386 unsigned getHashValue() const {
909909 AssertDI(isScope(N.getRawScope()), "invalid scope", &N, N.getRawScope());
910910 AssertDI(isType(N.getRawBaseType()), "invalid base type", &N,
911911 N.getRawBaseType());
912
913 if (N.getDWARFAddressSpace()) {
914 AssertDI(N.getTag() == dwarf::DW_TAG_pointer_type ||
915 N.getTag() == dwarf::DW_TAG_reference_type,
916 "DWARF address space only applies to pointer or reference types",
917 &N);
918 }
912919 }
913920
914921 static bool hasConflictingReferenceFlags(unsigned Flags) {
3636 !13 = distinct !{}
3737 !14 = !DIFile(filename: "", directory: "")
3838
39 ; CHECK-NEXT: !13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 32, align: 32)
40 !15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 32, align: 32)
39 ; CHECK-NEXT: !13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 32, align: 32, dwarfAddressSpace: 1)
40 !15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 32, align: 32, dwarfAddressSpace: 1)
4141
4242 ; CHECK-NEXT: !14 = !DICompositeType(tag: DW_TAG_structure_type, name: "MyType", file: !10, line: 2, size: 32, align: 32, identifier: "MangledMyType")
4343 ; CHECK-NEXT: !15 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Base", scope: !14, file: !10, line: 3, size: 128, align: 32, offset: 64, flags: DIFlagPublic, elements: !16, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !15, templateParams: !18, identifier: "MangledBase")
8383 ; CHECK-NEXT: !33 = !DIFile(filename: "file", directory: "dir")
8484 !35 = !DIFile(filename: "file", directory: "dir", checksumkind: CSK_MD5, checksum: "000102030405060708090a0b0c0d0e0f")
8585 !36 = !DIFile(filename: "file", directory: "dir", checksumkind: CSK_None)
86 !37 = !DIFile(filename: "file", directory: "dir", checksumkind: CSK_None, checksum: "")
86 !37 = !DIFile(filename: "file", directory: "dir", checksumkind: CSK_None, checksum: "")
0 ; RUN: llvm-dis -o - %s.bc | FileCheck %s
1
2 ; CHECK-DAG: !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !{{[0-9]+}}, size: {{[0-9]+}})
3 ; CHECK-DAG: !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !{{[0-9]+}}, size: {{[0-9]+}})
4 ; CHECK-DAG: !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !{{[0-9]+}}, size: {{[0-9]+}})
0 ; RUN: llc -O0 -mtriple=amdgcn--amdhsa -mcpu=fiji -verify-machineinstrs -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s
1
2 ; LLVM IR generated with the following command and OpenCL source:
3 ;
4 ; $clang -cl-std=CL2.0 -g -O0 -target amdgcn-amd-amdhsa -S -emit-llvm
5 ;
6 ; kernel void kernel1() {
7 ; global int *FuncVar0 = 0;
8 ; constant int *FuncVar1 = 0;
9 ; local int *FuncVar2 = 0;
10 ; private int *FuncVar3 = 0;
11 ; int *FuncVar4 = 0;
12 ; }
13
14 ; DW_AT_address_class is available since Dwarf Version 2.
15 ; CHECK-NOT: DW_AT_address_class
16
17 declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
18
19 define amdgpu_kernel void @kernel1() #0 !dbg !7 {
20 entry:
21 %FuncVar0 = alloca i32 addrspace(1)*, align 4
22 %FuncVar1 = alloca i32 addrspace(2)*, align 4
23 %FuncVar2 = alloca i32 addrspace(3)*, align 4
24 %FuncVar3 = alloca i32*, align 4
25 %FuncVar4 = alloca i32 addrspace(4)*, align 4
26 call void @llvm.dbg.declare(metadata i32 addrspace(1)** %FuncVar0, metadata !10, metadata !13), !dbg !14
27 store i32 addrspace(1)* null, i32 addrspace(1)** %FuncVar0, align 4, !dbg !14
28 call void @llvm.dbg.declare(metadata i32 addrspace(2)** %FuncVar1, metadata !15, metadata !13), !dbg !16
29 store i32 addrspace(2)* null, i32 addrspace(2)** %FuncVar1, align 4, !dbg !16
30 call void @llvm.dbg.declare(metadata i32 addrspace(3)** %FuncVar2, metadata !17, metadata !13), !dbg !19
31 store i32 addrspace(3)* addrspacecast (i32 addrspace(4)* null to i32 addrspace(3)*), i32 addrspace(3)** %FuncVar2, align 4, !dbg !19
32 call void @llvm.dbg.declare(metadata i32** %FuncVar3, metadata !20, metadata !13), !dbg !22
33 store i32* addrspacecast (i32 addrspace(4)* null to i32*), i32** %FuncVar3, align 4, !dbg !22
34 call void @llvm.dbg.declare(metadata i32 addrspace(4)** %FuncVar4, metadata !23, metadata !13), !dbg !24
35 store i32 addrspace(4)* null, i32 addrspace(4)** %FuncVar4, align 4, !dbg !24
36 ret void, !dbg !25
37 }
38
39 !llvm.dbg.cu = !{!0}
40 !opencl.ocl.version = !{!3}
41 !llvm.module.flags = !{!4, !5}
42 !llvm.ident = !{!6}
43
44 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
45 !1 = !DIFile(filename: "pointer-address-space-dwarf-v1.cl", directory: "/some/random/directory")
46 !2 = !{}
47 !3 = !{i32 2, i32 0}
48 !4 = !{i32 2, !"Dwarf Version", i32 1}
49 !5 = !{i32 2, !"Debug Info Version", i32 3}
50 !6 = !{!""}
51 !7 = distinct !DISubprogram(name: "kernel1", scope: !1, file: !1, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, variables: !2)
52 !8 = !DISubroutineType(types: !9)
53 !9 = !{null}
54 !10 = !DILocalVariable(name: "FuncVar0", scope: !7, file: !1, line: 2, type: !11)
55 !11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 64)
56 !12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
57 !13 = !DIExpression()
58 !14 = !DILocation(line: 2, column: 15, scope: !7)
59 !15 = !DILocalVariable(name: "FuncVar1", scope: !7, file: !1, line: 3, type: !11)
60 !16 = !DILocation(line: 3, column: 17, scope: !7)
61 !17 = !DILocalVariable(name: "FuncVar2", scope: !7, file: !1, line: 4, type: !18)
62 !18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 32, dwarfAddressSpace: 2)
63 !19 = !DILocation(line: 4, column: 14, scope: !7)
64 !20 = !DILocalVariable(name: "FuncVar3", scope: !7, file: !1, line: 5, type: !21)
65 !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 32, dwarfAddressSpace: 1)
66 !22 = !DILocation(line: 5, column: 16, scope: !7)
67 !23 = !DILocalVariable(name: "FuncVar4", scope: !7, file: !1, line: 6, type: !11)
68 !24 = !DILocation(line: 6, column: 8, scope: !7)
69 !25 = !DILocation(line: 7, column: 1, scope: !7)
0 ; RUN: llc -O0 -mtriple=amdgcn--amdhsa -mcpu=fiji -verify-machineinstrs -filetype=obj < %s | llvm-dwarfdump -debug-dump=info - | FileCheck %s
1
2 ; LLVM IR generated with the following command and OpenCL source:
3 ;
4 ; $clang -cl-std=CL2.0 -g -O0 -target amdgcn-amd-amdhsa -S -emit-llvm
5 ;
6 ; kernel void kernel1() {
7 ; global int *FuncVar0 = 0;
8 ; constant int *FuncVar1 = 0;
9 ; local int *FuncVar2 = 0;
10 ; private int *FuncVar3 = 0;
11 ; int *FuncVar4 = 0;
12 ; }
13
14 ; CHECK: DW_AT_name {{.*}}"FuncVar0"
15 ; CHECK-NEXT: DW_AT_decl_file
16 ; CHECK-NEXT: DW_AT_decl_line
17 ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[a-f0-9]+}} => {0x[[NONE:[a-f0-9]+]]})
18
19 ; CHECK: DW_AT_name {{.*}}"FuncVar1"
20 ; CHECK-NEXT: DW_AT_decl_file
21 ; CHECK-NEXT: DW_AT_decl_line
22 ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[a-f0-9]+}} => {0x[[NONE]]})
23
24 ; CHECK: DW_AT_name {{.*}}"FuncVar2"
25 ; CHECK-NEXT: DW_AT_decl_file
26 ; CHECK-NEXT: DW_AT_decl_line
27 ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[a-f0-9]+}} => {0x[[LOCAL:[a-f0-9]+]]})
28
29 ; CHECK: DW_AT_name {{.*}}"FuncVar3"
30 ; CHECK-NEXT: DW_AT_decl_file
31 ; CHECK-NEXT: DW_AT_decl_line
32 ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[a-f0-9]+}} => {0x[[PRIVATE:[a-f0-9]+]]})
33
34 ; CHECK: DW_AT_name {{.*}}"FuncVar4"
35 ; CHECK-NEXT: DW_AT_decl_file
36 ; CHECK-NEXT: DW_AT_decl_line
37 ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + 0x{{[a-f0-9]+}} => {0x[[NONE]]})
38
39 ; CHECK: 0x[[NONE]]: DW_TAG_pointer_type
40 ; CHECK-NEXT: DW_AT_type
41 ; CHECK-NOT: DW_AT_address_class
42
43 ; CHECK: 0x[[LOCAL]]: DW_TAG_pointer_type
44 ; CHECK-NEXT: DW_AT_type
45 ; CHECK-NEXT: DW_AT_address_class [DW_FORM_data4] (0x00000002)
46
47 ; CHECK: 0x[[PRIVATE]]: DW_TAG_pointer_type
48 ; CHECK-NEXT: DW_AT_type
49 ; CHECK-NEXT: DW_AT_address_class [DW_FORM_data4] (0x00000001)
50
51 declare void @llvm.dbg.declare(metadata, metadata, metadata)
52
53 define amdgpu_kernel void @kernel1() !dbg !7 {
54 entry:
55 %FuncVar0 = alloca i32 addrspace(1)*, align 4
56 %FuncVar1 = alloca i32 addrspace(2)*, align 4
57 %FuncVar2 = alloca i32 addrspace(3)*, align 4
58 %FuncVar3 = alloca i32*, align 4
59 %FuncVar4 = alloca i32 addrspace(4)*, align 4
60 call void @llvm.dbg.declare(metadata i32 addrspace(1)** %FuncVar0, metadata !10, metadata !13), !dbg !14
61 store i32 addrspace(1)* null, i32 addrspace(1)** %FuncVar0, align 4, !dbg !14
62 call void @llvm.dbg.declare(metadata i32 addrspace(2)** %FuncVar1, metadata !15, metadata !13), !dbg !16
63 store i32 addrspace(2)* null, i32 addrspace(2)** %FuncVar1, align 4, !dbg !16
64 call void @llvm.dbg.declare(metadata i32 addrspace(3)** %FuncVar2, metadata !17, metadata !13), !dbg !19
65 store i32 addrspace(3)* addrspacecast (i32 addrspace(4)* null to i32 addrspace(3)*), i32 addrspace(3)** %FuncVar2, align 4, !dbg !19
66 call void @llvm.dbg.declare(metadata i32** %FuncVar3, metadata !20, metadata !13), !dbg !22
67 store i32* addrspacecast (i32 addrspace(4)* null to i32*), i32** %FuncVar3, align 4, !dbg !22
68 call void @llvm.dbg.declare(metadata i32 addrspace(4)** %FuncVar4, metadata !23, metadata !13), !dbg !24
69 store i32 addrspace(4)* null, i32 addrspace(4)** %FuncVar4, align 4, !dbg !24
70 ret void, !dbg !25
71 }
72
73 !llvm.dbg.cu = !{!0}
74 !opencl.ocl.version = !{!3}
75 !llvm.module.flags = !{!4, !5}
76 !llvm.ident = !{!6}
77
78 !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
79 !1 = !DIFile(filename: "pointer-address-space.ll", directory: "/some/random/directory")
80 !2 = !{}
81 !3 = !{i32 2, i32 0}
82 !4 = !{i32 2, !"Dwarf Version", i32 2}
83 !5 = !{i32 2, !"Debug Info Version", i32 3}
84 !6 = !{!""}
85 !7 = distinct !DISubprogram(name: "kernel1", scope: !1, file: !1, line: 1, type: !8, isLocal: false, isDefinition: true, scopeLine: 1, isOptimized: false, unit: !0, variables: !2)
86 !8 = !DISubroutineType(types: !9)
87 !9 = !{null}
88 !10 = !DILocalVariable(name: "FuncVar0", scope: !7, file: !1, line: 2, type: !11)
89 !11 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 64)
90 !12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
91 !13 = !DIExpression()
92 !14 = !DILocation(line: 2, column: 15, scope: !7)
93 !15 = !DILocalVariable(name: "FuncVar1", scope: !7, file: !1, line: 3, type: !11)
94 !16 = !DILocation(line: 3, column: 17, scope: !7)
95 !17 = !DILocalVariable(name: "FuncVar2", scope: !7, file: !1, line: 4, type: !18)
96 !18 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 32, dwarfAddressSpace: 2)
97 !19 = !DILocation(line: 4, column: 14, scope: !7)
98 !20 = !DILocalVariable(name: "FuncVar3", scope: !7, file: !1, line: 5, type: !21)
99 !21 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !12, size: 32, dwarfAddressSpace: 1)
100 !22 = !DILocation(line: 5, column: 16, scope: !7)
101 !23 = !DILocalVariable(name: "FuncVar4", scope: !7, file: !1, line: 6, type: !11)
102 !24 = !DILocation(line: 6, column: 8, scope: !7)
103 !25 = !DILocation(line: 7, column: 1, scope: !7)
0 ; RUN: not opt -S < %s 2>&1 | FileCheck %s
1
2 !named = !{!0, !1}
3 !0 = !DIBasicType(tag: DW_TAG_base_type, name: "name", size: 1, align: 2, encoding: DW_ATE_unsigned_char)
4 ; CHECK: DWARF address space only applies to pointer or reference types
5 !1 = !DIDerivedType(tag: DW_TAG_atomic_type, baseType: !0, size: 32, align: 32, dwarfAddressSpace: 1)
0 ; RUN: not opt -S < %s 2>&1 | FileCheck %s
1
2 !named = !{!0, !1}
3 !0 = !DIBasicType(tag: DW_TAG_base_type, name: "name", size: 1, align: 2, encoding: DW_ATE_unsigned_char)
4 ; CHECK: DWARF address space only applies to pointer or reference types
5 !1 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !0, size: 32, align: 32, dwarfAddressSpace: 1)
0 ; RUN: not opt -S < %s 2>&1 | FileCheck %s
1
2 !named = !{!0, !1}
3 !0 = !DIBasicType(tag: DW_TAG_base_type, name: "name", size: 1, align: 2, encoding: DW_ATE_unsigned_char)
4 ; CHECK: DWARF address space only applies to pointer or reference types
5 !1 = !DIDerivedType(tag: DW_TAG_friend, baseType: !0, size: 32, align: 32, dwarfAddressSpace: 1)
0 ; RUN: not opt -S < %s 2>&1 | FileCheck %s
1
2 !named = !{!0, !1}
3 !0 = !DIBasicType(tag: DW_TAG_base_type, name: "name", size: 1, align: 2, encoding: DW_ATE_unsigned_char)
4 ; CHECK: DWARF address space only applies to pointer or reference types
5 !1 = !DIDerivedType(tag: DW_TAG_inheritance, baseType: !0, size: 32, align: 32, dwarfAddressSpace: 1)
0 ; RUN: not opt -S < %s 2>&1 | FileCheck %s
1
2 !named = !{!0, !1}
3 !0 = !DIBasicType(tag: DW_TAG_base_type, name: "name", size: 1, align: 2, encoding: DW_ATE_unsigned_char)
4 ; CHECK: DWARF address space only applies to pointer or reference types
5 !1 = !DIDerivedType(tag: DW_TAG_member, baseType: !0, size: 32, align: 32, dwarfAddressSpace: 1)
0 ; RUN: not opt -S < %s 2>&1 | FileCheck %s
1
2 !named = !{!0, !1}
3 !0 = !DIBasicType(tag: DW_TAG_base_type, name: "name", size: 1, align: 2, encoding: DW_ATE_unsigned_char)
4 ; CHECK: DWARF address space only applies to pointer or reference types
5 !1 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !0, size: 32, align: 32, dwarfAddressSpace: 1)
0 ; RUN: not opt -S < %s 2>&1 | FileCheck %s
1
2 !named = !{!0, !1}
3 !0 = !DIBasicType(tag: DW_TAG_base_type, name: "name", size: 1, align: 2, encoding: DW_ATE_unsigned_char)
4 ; CHECK: DWARF address space only applies to pointer or reference types
5 !1 = !DIDerivedType(tag: DW_TAG_restrict_type, baseType: !0, size: 32, align: 32, dwarfAddressSpace: 1)
0 ; RUN: not opt -S < %s 2>&1 | FileCheck %s
1
2 !named = !{!0, !1}
3 !0 = !DIBasicType(tag: DW_TAG_base_type, name: "name", size: 1, align: 2, encoding: DW_ATE_unsigned_char)
4 ; CHECK: DWARF address space only applies to pointer or reference types
5 !1 = !DIDerivedType(tag: DW_TAG_rvalue_reference_type, baseType: !0, size: 32, align: 32, dwarfAddressSpace: 1)
0 ; RUN: not opt -S < %s 2>&1 | FileCheck %s
1
2 !named = !{!0, !1}
3 !0 = !DIBasicType(tag: DW_TAG_base_type, name: "name", size: 1, align: 2, encoding: DW_ATE_unsigned_char)
4 ; CHECK: DWARF address space only applies to pointer or reference types
5 !1 = !DIDerivedType(tag: DW_TAG_typedef, baseType: !0, size: 32, align: 32, dwarfAddressSpace: 1)
0 ; RUN: not opt -S < %s 2>&1 | FileCheck %s
1
2 !named = !{!0, !1}
3 !0 = !DIBasicType(tag: DW_TAG_base_type, name: "name", size: 1, align: 2, encoding: DW_ATE_unsigned_char)
4 ; CHECK: DWARF address space only applies to pointer or reference types
5 !1 = !DIDerivedType(tag: DW_TAG_volatile_type, baseType: !0, size: 32, align: 32, dwarfAddressSpace: 1)
102102 DIType *getDerivedType() {
103103 return DIDerivedType::getDistinct(
104104 Context, dwarf::DW_TAG_pointer_type, "", nullptr, 0, nullptr,
105 getBasicType("basictype"), 1, 2, 0, DINode::FlagZero);
105 getBasicType("basictype"), 1, 2, 0, None, DINode::FlagZero);
106106 }
107107 Constant *getConstant() {
108108 return ConstantInt::get(Type::getInt32Ty(Context), Counter++);
10521052 DIScope *Scope = getSubprogram();
10531053 DIType *BaseType = getBasicType("basic");
10541054 MDTuple *ExtraData = getTuple();
1055 unsigned DWARFAddressSpace = 8;
10551056 DINode::DIFlags Flags5 = static_cast(5);
10561057 DINode::DIFlags Flags4 = static_cast(4);
10571058
10581059 auto *N =
10591060 DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, "something", File,
1060 1, Scope, BaseType, 2, 3, 4, Flags5, ExtraData);
1061 1, Scope, BaseType, 2, 3, 4, DWARFAddressSpace, Flags5,
1062 ExtraData);
10611063 EXPECT_EQ(dwarf::DW_TAG_pointer_type, N->getTag());
10621064 EXPECT_EQ("something", N->getName());
10631065 EXPECT_EQ(File, N->getFile());
10671069 EXPECT_EQ(2u, N->getSizeInBits());
10681070 EXPECT_EQ(3u, N->getAlignInBits());
10691071 EXPECT_EQ(4u, N->getOffsetInBits());
1072 EXPECT_EQ(DWARFAddressSpace, N->getDWARFAddressSpace().getValue());
10701073 EXPECT_EQ(5u, N->getFlags());
10711074 EXPECT_EQ(ExtraData, N->getExtraData());
10721075 EXPECT_EQ(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
10731076 "something", File, 1, Scope, BaseType, 2, 3,
1074 4, Flags5, ExtraData));
1077 4, DWARFAddressSpace, Flags5, ExtraData));
10751078
10761079 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_reference_type,
10771080 "something", File, 1, Scope, BaseType, 2, 3,
1078 4, Flags5, ExtraData));
1081 4, DWARFAddressSpace, Flags5, ExtraData));
10791082 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, "else",
1080 File, 1, Scope, BaseType, 2, 3, 4, Flags5,
1081 ExtraData));
1083 File, 1, Scope, BaseType, 2, 3,
1084 4, DWARFAddressSpace, Flags5, ExtraData));
10821085 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
10831086 "something", getFile(), 1, Scope, BaseType, 2,
1084 3, 4, Flags5, ExtraData));
1087 3, 4, DWARFAddressSpace, Flags5, ExtraData));
10851088 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
10861089 "something", File, 2, Scope, BaseType, 2, 3,
1087 4, Flags5, ExtraData));
1090 4, DWARFAddressSpace, Flags5, ExtraData));
10881091 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
10891092 "something", File, 1, getSubprogram(),
1090 BaseType, 2, 3, 4, Flags5, ExtraData));
1093 BaseType, 2, 3, 4, DWARFAddressSpace, Flags5,
1094 ExtraData));
10911095 EXPECT_NE(N, DIDerivedType::get(
10921096 Context, dwarf::DW_TAG_pointer_type, "something", File, 1,
1093 Scope, getBasicType("basic2"), 2, 3, 4, Flags5, ExtraData));
1097 Scope, getBasicType("basic2"), 2, 3, 4, DWARFAddressSpace,
1098 Flags5, ExtraData));
10941099 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
10951100 "something", File, 1, Scope, BaseType, 3, 3,
1096 4, Flags5, ExtraData));
1101 4, DWARFAddressSpace, Flags5, ExtraData));
10971102 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
10981103 "something", File, 1, Scope, BaseType, 2, 2,
1099 4, Flags5, ExtraData));
1104 4, DWARFAddressSpace, Flags5, ExtraData));
11001105 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
11011106 "something", File, 1, Scope, BaseType, 2, 3,
1102 5, Flags5, ExtraData));
1107 5, DWARFAddressSpace, Flags5, ExtraData));
11031108 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
11041109 "something", File, 1, Scope, BaseType, 2, 3,
1105 4, Flags4, ExtraData));
1110 4, DWARFAddressSpace + 1, Flags5, ExtraData));
11061111 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
11071112 "something", File, 1, Scope, BaseType, 2, 3,
1108 4, Flags5, getTuple()));
1113 4, DWARFAddressSpace, Flags4, ExtraData));
1114 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1115 "something", File, 1, Scope, BaseType, 2, 3,
1116 4, DWARFAddressSpace, Flags5, getTuple()));
11091117
11101118 TempDIDerivedType Temp = N->clone();
11111119 EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
11201128
11211129 auto *N = DIDerivedType::get(
11221130 Context, dwarf::DW_TAG_pointer_type, "something", File, 1, Scope,
1123 BaseType, UINT64_MAX, UINT32_MAX - 1, UINT64_MAX - 2, Flags, ExtraData);
1131 BaseType, UINT64_MAX, UINT32_MAX - 1, UINT64_MAX - 2, UINT32_MAX - 3,
1132 Flags, ExtraData);
11241133 EXPECT_EQ(UINT64_MAX, N->getSizeInBits());
11251134 EXPECT_EQ(UINT32_MAX - 1, N->getAlignInBits());
11261135 EXPECT_EQ(UINT64_MAX - 2, N->getOffsetInBits());
1136 EXPECT_EQ(UINT32_MAX - 3, N->getDWARFAddressSpace().getValue());
11271137 }
11281138
11291139 typedef MetadataTest DICompositeTypeTest;