@@ -1228,16 +1228,17 @@ class DICompileUnit : public DIScope {
1228
1228
DIGlobalVariableExpressionArray GlobalVariables,
1229
1229
DIImportedEntityArray ImportedEntities, DIMacroNodeArray Macros,
1230
1230
uint64_t DWOId, bool SplitDebugInlining, bool DebugInfoForProfiling,
1231
- unsigned NameTableKind, bool RangesBaseAddress, StorageType Storage,
1232
- bool ShouldCreate = true ) {
1233
- return getImpl (Context, SourceLanguage, File,
1234
- getCanonicalMDString (Context, Producer), IsOptimized,
1235
- getCanonicalMDString (Context, Flags), RuntimeVersion,
1236
- getCanonicalMDString (Context, SplitDebugFilename),
1237
- EmissionKind, EnumTypes.get (), RetainedTypes.get (),
1238
- GlobalVariables.get (), ImportedEntities.get (), Macros.get (),
1239
- DWOId, SplitDebugInlining, DebugInfoForProfiling,
1240
- NameTableKind, RangesBaseAddress, Storage, ShouldCreate);
1231
+ unsigned NameTableKind, bool RangesBaseAddress, StringRef SysRoot,
1232
+ StringRef SDK, StorageType Storage, bool ShouldCreate = true ) {
1233
+ return getImpl (
1234
+ Context, SourceLanguage, File, getCanonicalMDString (Context, Producer),
1235
+ IsOptimized, getCanonicalMDString (Context, Flags), RuntimeVersion,
1236
+ getCanonicalMDString (Context, SplitDebugFilename), EmissionKind,
1237
+ EnumTypes.get (), RetainedTypes.get (), GlobalVariables.get (),
1238
+ ImportedEntities.get (), Macros.get (), DWOId, SplitDebugInlining,
1239
+ DebugInfoForProfiling, NameTableKind, RangesBaseAddress,
1240
+ getCanonicalMDString (Context, SysRoot),
1241
+ getCanonicalMDString (Context, SDK), Storage, ShouldCreate);
1241
1242
}
1242
1243
static DICompileUnit *
1243
1244
getImpl (LLVMContext &Context, unsigned SourceLanguage, Metadata *File,
@@ -1247,7 +1248,8 @@ class DICompileUnit : public DIScope {
1247
1248
Metadata *GlobalVariables, Metadata *ImportedEntities,
1248
1249
Metadata *Macros, uint64_t DWOId, bool SplitDebugInlining,
1249
1250
bool DebugInfoForProfiling, unsigned NameTableKind,
1250
- bool RangesBaseAddress, StorageType Storage, bool ShouldCreate = true );
1251
+ bool RangesBaseAddress, MDString *SysRoot, MDString *SDK,
1252
+ StorageType Storage, bool ShouldCreate = true );
1251
1253
1252
1254
TempDICompileUnit cloneImpl () const {
1253
1255
return getTemporary (
@@ -1256,7 +1258,7 @@ class DICompileUnit : public DIScope {
1256
1258
getEmissionKind (), getEnumTypes (), getRetainedTypes (),
1257
1259
getGlobalVariables (), getImportedEntities (), getMacros (), DWOId,
1258
1260
getSplitDebugInlining (), getDebugInfoForProfiling (), getNameTableKind (),
1259
- getRangesBaseAddress ());
1261
+ getRangesBaseAddress (), getSysRoot (), getSDK () );
1260
1262
}
1261
1263
1262
1264
public:
@@ -1272,11 +1274,13 @@ class DICompileUnit : public DIScope {
1272
1274
DIGlobalVariableExpressionArray GlobalVariables,
1273
1275
DIImportedEntityArray ImportedEntities, DIMacroNodeArray Macros,
1274
1276
uint64_t DWOId, bool SplitDebugInlining, bool DebugInfoForProfiling,
1275
- DebugNameTableKind NameTableKind, bool RangesBaseAddress),
1277
+ DebugNameTableKind NameTableKind, bool RangesBaseAddress,
1278
+ StringRef SysRoot, StringRef SDK),
1276
1279
(SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion,
1277
1280
SplitDebugFilename, EmissionKind, EnumTypes, RetainedTypes,
1278
1281
GlobalVariables, ImportedEntities, Macros, DWOId, SplitDebugInlining,
1279
- DebugInfoForProfiling, (unsigned )NameTableKind, RangesBaseAddress))
1282
+ DebugInfoForProfiling, (unsigned )NameTableKind, RangesBaseAddress,
1283
+ SysRoot, SDK))
1280
1284
DEFINE_MDNODE_GET_DISTINCT_TEMPORARY(
1281
1285
DICompileUnit,
1282
1286
(unsigned SourceLanguage, Metadata *File, MDString *Producer,
@@ -1285,11 +1289,12 @@ class DICompileUnit : public DIScope {
1285
1289
Metadata *RetainedTypes, Metadata *GlobalVariables,
1286
1290
Metadata *ImportedEntities, Metadata *Macros, uint64_t DWOId,
1287
1291
bool SplitDebugInlining, bool DebugInfoForProfiling,
1288
- unsigned NameTableKind, bool RangesBaseAddress),
1292
+ unsigned NameTableKind, bool RangesBaseAddress, MDString *SysRoot,
1293
+ MDString *SDK),
1289
1294
(SourceLanguage, File, Producer, IsOptimized, Flags, RuntimeVersion,
1290
1295
SplitDebugFilename, EmissionKind, EnumTypes, RetainedTypes,
1291
1296
GlobalVariables, ImportedEntities, Macros, DWOId, SplitDebugInlining,
1292
- DebugInfoForProfiling, NameTableKind, RangesBaseAddress))
1297
+ DebugInfoForProfiling, NameTableKind, RangesBaseAddress, SysRoot, SDK ))
1293
1298
1294
1299
TempDICompileUnit clone() const { return cloneImpl (); }
1295
1300
@@ -1306,14 +1311,10 @@ class DICompileUnit : public DIScope {
1306
1311
DebugNameTableKind getNameTableKind () const {
1307
1312
return (DebugNameTableKind)NameTableKind;
1308
1313
}
1309
- bool getRangesBaseAddress () const {
1310
- return RangesBaseAddress; }
1311
- StringRef getProducer () const {
1312
- return getStringOperand (1 ); }
1313
- StringRef getFlags () const {
1314
- return getStringOperand (2 ); }
1315
- StringRef getSplitDebugFilename () const {
1316
- return getStringOperand (3 ); }
1314
+ bool getRangesBaseAddress () const { return RangesBaseAddress; }
1315
+ StringRef getProducer () const { return getStringOperand (1 ); }
1316
+ StringRef getFlags () const { return getStringOperand (2 ); }
1317
+ StringRef getSplitDebugFilename () const { return getStringOperand (3 ); }
1317
1318
DICompositeTypeArray getEnumTypes () const {
1318
1319
return cast_or_null<MDTuple>(getRawEnumTypes ());
1319
1320
}
@@ -1335,6 +1336,8 @@ class DICompileUnit : public DIScope {
1335
1336
void setSplitDebugInlining (bool SplitDebugInlining) {
1336
1337
this ->SplitDebugInlining = SplitDebugInlining;
1337
1338
}
1339
+ StringRef getSysRoot () const { return getStringOperand (9 ); }
1340
+ StringRef getSDK () const { return getStringOperand (10 ); }
1338
1341
1339
1342
MDString *getRawProducer () const { return getOperandAs<MDString>(1 ); }
1340
1343
MDString *getRawFlags () const { return getOperandAs<MDString>(2 ); }
@@ -1346,6 +1349,8 @@ class DICompileUnit : public DIScope {
1346
1349
Metadata *getRawGlobalVariables () const { return getOperand (6 ); }
1347
1350
Metadata *getRawImportedEntities () const { return getOperand (7 ); }
1348
1351
Metadata *getRawMacros () const { return getOperand (8 ); }
1352
+ MDString *getRawSysRoot () const { return getOperandAs<MDString>(9 ); }
1353
+ MDString *getRawSDK () const { return getOperandAs<MDString>(10 ); }
1349
1354
1350
1355
// / Replace arrays.
1351
1356
// /
@@ -2138,50 +2143,45 @@ class DIModule : public DIScope {
2138
2143
: DIScope(Context, DIModuleKind, Storage, dwarf::DW_TAG_module, Ops) {}
2139
2144
~DIModule () = default ;
2140
2145
2141
- static DIModule *getImpl (LLVMContext &Context, DIScope *Scope,
2142
- StringRef Name, StringRef ConfigurationMacros,
2143
- StringRef IncludePath, StringRef SysRoot,
2146
+ static DIModule *getImpl (LLVMContext &Context, DIScope *Scope, StringRef Name,
2147
+ StringRef ConfigurationMacros, StringRef IncludePath,
2144
2148
StorageType Storage, bool ShouldCreate = true ) {
2145
2149
return getImpl (Context, Scope, getCanonicalMDString (Context, Name),
2146
2150
getCanonicalMDString (Context, ConfigurationMacros),
2147
2151
getCanonicalMDString (Context, IncludePath),
2148
- getCanonicalMDString (Context, SysRoot),
2149
2152
Storage, ShouldCreate);
2150
2153
}
2151
2154
static DIModule *getImpl (LLVMContext &Context, Metadata *Scope,
2152
2155
MDString *Name, MDString *ConfigurationMacros,
2153
- MDString *IncludePath, MDString *SysRoot ,
2154
- StorageType Storage, bool ShouldCreate = true );
2156
+ MDString *IncludePath, StorageType Storage ,
2157
+ bool ShouldCreate = true );
2155
2158
2156
2159
TempDIModule cloneImpl () const {
2157
2160
return getTemporary (getContext (), getScope (), getName (),
2158
- getConfigurationMacros (), getIncludePath (),
2159
- getSysRoot ());
2161
+ getConfigurationMacros (), getIncludePath ());
2160
2162
}
2161
2163
2162
2164
public:
2163
- DEFINE_MDNODE_GET (DIModule, (DIScope *Scope, StringRef Name,
2164
- StringRef ConfigurationMacros , StringRef IncludePath ,
2165
- StringRef SysRoot ),
2166
- (Scope, Name, ConfigurationMacros, IncludePath, SysRoot ))
2165
+ DEFINE_MDNODE_GET (DIModule,
2166
+ (DIScope * Scope , StringRef Name ,
2167
+ StringRef ConfigurationMacros, StringRef IncludePath ),
2168
+ (Scope, Name, ConfigurationMacros, IncludePath))
2167
2169
DEFINE_MDNODE_GET (DIModule,
2168
2170
(Metadata *Scope, MDString *Name, MDString *ConfigurationMacros,
2169
- MDString *IncludePath, MDString *SysRoot ),
2170
- (Scope, Name, ConfigurationMacros, IncludePath, SysRoot ))
2171
+ MDString *IncludePath),
2172
+ (Scope, Name, ConfigurationMacros, IncludePath))
2171
2173
2172
2174
TempDIModule clone () const { return cloneImpl (); }
2173
2175
2174
2176
DIScope *getScope () const { return cast_or_null<DIScope>(getRawScope ()); }
2175
2177
StringRef getName () const { return getStringOperand (1 ); }
2176
2178
StringRef getConfigurationMacros () const { return getStringOperand (2 ); }
2177
2179
StringRef getIncludePath () const { return getStringOperand (3 ); }
2178
- StringRef getSysRoot () const { return getStringOperand (4 ); }
2179
2180
2180
2181
Metadata *getRawScope () const { return getOperand (0 ); }
2181
2182
MDString *getRawName () const { return getOperandAs<MDString>(1 ); }
2182
2183
MDString *getRawConfigurationMacros () const { return getOperandAs<MDString>(2 ); }
2183
2184
MDString *getRawIncludePath () const { return getOperandAs<MDString>(3 ); }
2184
- MDString *getRawSysRoot () const { return getOperandAs<MDString>(4 ); }
2185
2185
2186
2186
static bool classof (const Metadata *MD) {
2187
2187
return MD->getMetadataID () == DIModuleKind;
0 commit comments