@@ -1160,8 +1160,8 @@ class DICompositeType : public DIType {
1160
1160
DICompositeType (LLVMContext &C, StorageType Storage, unsigned Tag,
1161
1161
unsigned Line, unsigned RuntimeLang, uint64_t SizeInBits,
1162
1162
uint32_t AlignInBits, uint64_t OffsetInBits,
1163
- uint32_t NumExtraInhabitants, APInt SpareBitsMask, DIFlags Flags,
1164
- ArrayRef<Metadata *> Ops)
1163
+ uint32_t NumExtraInhabitants, APInt SpareBitsMask,
1164
+ DIFlags Flags, ArrayRef<Metadata *> Ops)
1165
1165
: DIType(C, DICompositeTypeKind, Storage, Tag, Line, SizeInBits,
1166
1166
AlignInBits, OffsetInBits, NumExtraInhabitants, Flags, Ops),
1167
1167
RuntimeLang (RuntimeLang), SpareBitsMask(SpareBitsMask) {}
@@ -1181,21 +1181,21 @@ class DICompositeType : public DIType {
1181
1181
static DICompositeType *
1182
1182
getImpl (LLVMContext &Context, unsigned Tag, StringRef Name, Metadata *File,
1183
1183
unsigned Line, DIScope *Scope, DIType *BaseType, uint64_t SizeInBits,
1184
- uint32_t AlignInBits, uint64_t OffsetInBits,
1185
- uint32_t NumExtraInhabitants, APInt SpareBitsMask, DIFlags Flags, DINodeArray Elements,
1186
- unsigned RuntimeLang, DIType *VTableHolder,
1184
+ uint32_t AlignInBits, uint64_t OffsetInBits, DIType *SpecificationOf,
1185
+ uint32_t NumExtraInhabitants, APInt SpareBitsMask, DIFlags Flags,
1186
+ DINodeArray Elements, unsigned RuntimeLang, DIType *VTableHolder,
1187
1187
DITemplateParameterArray TemplateParams, StringRef Identifier,
1188
1188
DIDerivedType *Discriminator, Metadata *DataLocation,
1189
1189
Metadata *Associated, Metadata *Allocated, Metadata *Rank,
1190
1190
DINodeArray Annotations, StorageType Storage,
1191
1191
bool ShouldCreate = true ) {
1192
- return getImpl (Context, Tag, getCanonicalMDString (Context, Name), File,
1193
- Line, Scope, BaseType, SizeInBits, AlignInBits, OffsetInBits ,
1194
- Flags, Elements.get (), RuntimeLang, VTableHolder ,
1195
- TemplateParams.get (),
1196
- getCanonicalMDString (Context, Identifier), Discriminator,
1197
- DataLocation, Associated, Allocated, Rank, Annotations.get (),
1198
- NumExtraInhabitants, SpareBitsMask, Storage, ShouldCreate);
1192
+ return getImpl (
1193
+ Context, Tag, getCanonicalMDString (Context, Name), File, Line, Scope ,
1194
+ BaseType, SizeInBits, AlignInBits, OffsetInBits, Flags, Elements.get (),
1195
+ RuntimeLang, VTableHolder, TemplateParams.get (),
1196
+ getCanonicalMDString (Context, Identifier), Discriminator, DataLocation ,
1197
+ Associated, Allocated, Rank, Annotations.get (), SpecificationOf ,
1198
+ NumExtraInhabitants, SpareBitsMask, Storage, ShouldCreate);
1199
1199
}
1200
1200
static DICompositeType *
1201
1201
getImpl (LLVMContext &Context, unsigned Tag, MDString *Name, Metadata *File,
@@ -1205,7 +1205,8 @@ class DICompositeType : public DIType {
1205
1205
Metadata *VTableHolder, Metadata *TemplateParams,
1206
1206
MDString *Identifier, Metadata *Discriminator, Metadata *DataLocation,
1207
1207
Metadata *Associated, Metadata *Allocated, Metadata *Rank,
1208
- Metadata *Annotations, uint32_t NumExtraInhabitants, APInt SpareBitsMask,
1208
+ Metadata *Annotations, Metadata *SpecificationOf,
1209
+ uint32_t NumExtraInhabitants, APInt SpareBitsMask,
1209
1210
StorageType Storage, bool ShouldCreate = true );
1210
1211
1211
1212
TempDICompositeType cloneImpl () const {
@@ -1215,7 +1216,8 @@ class DICompositeType : public DIType {
1215
1216
getFlags (), getElements (), getRuntimeLang (), getVTableHolder (),
1216
1217
getTemplateParams (), getIdentifier (), getDiscriminator (),
1217
1218
getRawDataLocation (), getRawAssociated (), getRawAllocated (),
1218
- getRawRank (), getAnnotations (), getNumExtraInhabitants (), getSpareBitsMask ());
1219
+ getRawRank (), getAnnotations (), getSpecificationOf (),
1220
+ getNumExtraInhabitants (), getSpareBitsMask ());
1219
1221
}
1220
1222
1221
1223
public:
@@ -1229,11 +1231,12 @@ class DICompositeType : public DIType {
1229
1231
StringRef Identifier = " " , DIDerivedType *Discriminator = nullptr ,
1230
1232
Metadata *DataLocation = nullptr , Metadata *Associated = nullptr ,
1231
1233
Metadata *Allocated = nullptr , Metadata *Rank = nullptr ,
1232
- DINodeArray Annotations = nullptr , uint32_t NumExtraInhabitants = 0 , APInt SpareBitsMask = APInt()),
1234
+ DINodeArray Annotations = nullptr , DIType *SpecificationOf = nullptr ,
1235
+ uint32_t NumExtraInhabitants = 0 , APInt SpareBitsMask = APInt()),
1233
1236
(Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
1234
- OffsetInBits, NumExtraInhabitants, SpareBitsMask, Flags, Elements, RuntimeLang ,
1235
- VTableHolder, TemplateParams, Identifier, Discriminator, DataLocation ,
1236
- Associated, Allocated, Rank, Annotations))
1237
+ OffsetInBits, SpecificationOf, NumExtraInhabitants, SpareBitsMask, Flags,
1238
+ Elements, RuntimeLang, VTableHolder, TemplateParams, Identifier ,
1239
+ Discriminator, DataLocation, Associated, Allocated, Rank, Annotations))
1237
1240
DEFINE_MDNODE_GET(
1238
1241
DICompositeType,
1239
1242
(unsigned Tag, MDString *Name, Metadata *File, unsigned Line,
@@ -1244,11 +1247,12 @@ class DICompositeType : public DIType {
1244
1247
Metadata *Discriminator = nullptr , Metadata *DataLocation = nullptr ,
1245
1248
Metadata *Associated = nullptr , Metadata *Allocated = nullptr ,
1246
1249
Metadata *Rank = nullptr , Metadata *Annotations = nullptr ,
1247
- uint32_t NumExtraInhabitants = 0 , APInt SpareBitsMask = APInt()),
1250
+ Metadata *SpecificationOf = nullptr , uint32_t NumExtraInhabitants = 0 ,
1251
+ APInt SpareBitsMask = APInt()),
1248
1252
(Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
1249
1253
OffsetInBits, Flags, Elements, RuntimeLang, VTableHolder, TemplateParams,
1250
1254
Identifier, Discriminator, DataLocation, Associated, Allocated, Rank,
1251
- Annotations, NumExtraInhabitants, SpareBitsMask))
1255
+ Annotations, SpecificationOf, NumExtraInhabitants, SpareBitsMask))
1252
1256
1253
1257
TempDICompositeType clone() const { return cloneImpl (); }
1254
1258
@@ -1263,9 +1267,9 @@ class DICompositeType : public DIType {
1263
1267
getODRType (LLVMContext &Context, MDString &Identifier, unsigned Tag,
1264
1268
MDString *Name, Metadata *File, unsigned Line, Metadata *Scope,
1265
1269
Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits,
1266
- uint64_t OffsetInBits, uint32_t NumExtraInhabitants ,
1267
- APInt SpareBitsMask, DIFlags Flags, Metadata *Elements ,
1268
- unsigned RuntimeLang, Metadata *VTableHolder,
1270
+ uint64_t OffsetInBits, Metadata *SpecificationOf ,
1271
+ uint32_t NumExtraInhabitants, APInt SpareBitsMask, DIFlags Flags,
1272
+ Metadata *Elements, unsigned RuntimeLang, Metadata *VTableHolder,
1269
1273
Metadata *TemplateParams, Metadata *Discriminator,
1270
1274
Metadata *DataLocation, Metadata *Associated, Metadata *Allocated,
1271
1275
Metadata *Rank, Metadata *Annotations);
@@ -1285,9 +1289,9 @@ class DICompositeType : public DIType {
1285
1289
buildODRType (LLVMContext &Context, MDString &Identifier, unsigned Tag,
1286
1290
MDString *Name, Metadata *File, unsigned Line, Metadata *Scope,
1287
1291
Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits,
1288
- uint64_t OffsetInBits, uint32_t NumExtraInhabitants ,
1289
- APInt SpareBitsMask, DIFlags Flags, Metadata *Elements ,
1290
- unsigned RuntimeLang, Metadata *VTableHolder,
1292
+ uint64_t OffsetInBits, Metadata *SpecificationOf ,
1293
+ uint32_t NumExtraInhabitants, APInt SpareBitsMask, DIFlags Flags,
1294
+ Metadata *Elements, unsigned RuntimeLang, Metadata *VTableHolder,
1291
1295
Metadata *TemplateParams, Metadata *Discriminator,
1292
1296
Metadata *DataLocation, Metadata *Associated,
1293
1297
Metadata *Allocated, Metadata *Rank, Metadata *Annotations);
@@ -1351,6 +1355,10 @@ class DICompositeType : public DIType {
1351
1355
return cast_or_null<MDTuple>(getRawAnnotations ());
1352
1356
}
1353
1357
1358
+ Metadata *getRawSpecificationOf () const { return getOperand (14 ); }
1359
+ DIType *getSpecificationOf () const {
1360
+ return cast_or_null<DIType>(getRawSpecificationOf ());
1361
+ }
1354
1362
// / Replace operands.
1355
1363
// /
1356
1364
// / If this \a isUniqued() and not \a isResolved(), on a uniquing collision
0 commit comments