@@ -1175,11 +1175,10 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1175
1175
}
1176
1176
1177
1177
llvm::DINodeArray BoundParams = collectGenericParams (Type);
1178
- auto DITy = createStruct (
1178
+ llvm::DICompositeType * DITy = createStruct (
1179
1179
Scope, Name, File, Line, SizeInBits, AlignInBits, Flags, MangledName,
1180
1180
DBuilder.getOrCreateArray (Elements), BoundParams, SpecificationOf);
1181
- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1182
- return DITy;
1181
+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1183
1182
}
1184
1183
1185
1184
// / Creates debug info for a generic struct or class with archetypes (e.g.:
@@ -1219,11 +1218,10 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1219
1218
Elements.push_back (DITy);
1220
1219
}
1221
1220
1222
- auto DITy = DBuilder.createStructType (
1221
+ llvm::DICompositeType * DITy = DBuilder.createStructType (
1223
1222
Scope, Name, File, Line, SizeInBits, AlignInBits, Flags, DerivedFrom,
1224
1223
DBuilder.getOrCreateArray (Elements), RuntimeLang, nullptr , UniqueID );
1225
- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1226
- return DITy;
1224
+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1227
1225
}
1228
1226
1229
1227
std::pair<bool , Type> getUnsubstitutedType (Type Ty, StringRef MangledName) {
@@ -1265,11 +1263,10 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1265
1263
// Force the creation of the unsubstituted type, don't create it
1266
1264
// directly so it goes through all the caching/verification logic.
1267
1265
auto UnsubstitutedDITy = getOrCreateType (UnsubstitutedDbgTy);
1268
- auto DIType = createOpaqueStruct (
1266
+ llvm::DICompositeType * DIType = createOpaqueStruct (
1269
1267
Scope, " " , File, 0 , SizeInBits, AlignInBits, Flags, MangledName,
1270
1268
collectGenericParams (EnumTy), UnsubstitutedDITy);
1271
- DBuilder.replaceTemporary (std::move (FwdDecl), DIType);
1272
- return DIType;
1269
+ return DBuilder.replaceTemporary (std::move (FwdDecl), DIType);
1273
1270
}
1274
1271
1275
1272
// / Create a DICompositeType from a specialized struct. A specialized type
@@ -1341,8 +1338,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1341
1338
Scope, Decl ? Decl->getNameStr () : " " , File, Line, SizeInBits,
1342
1339
AlignInBits, Flags, MangledName, collectGenericParams (Type),
1343
1340
UnsubstitutedDITy);
1344
- DBuilder.replaceTemporary (std::move (FwdDecl), SpecializedDITy);
1345
- return SpecializedDITy;
1341
+ return DBuilder.replaceTemporary (std::move (FwdDecl), SpecializedDITy);
1346
1342
}
1347
1343
1348
1344
// / Create debug information for an enum with a raw type (enum E : Int {}).
@@ -1385,13 +1381,12 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1385
1381
}
1386
1382
1387
1383
auto EnumType = getOrCreateType (*ElemDbgTy);
1388
- auto DITy = DBuilder.createEnumerationType (
1384
+ llvm::DICompositeType * DITy = DBuilder.createEnumerationType (
1389
1385
Scope, Name, File, Line, SizeInBits, AlignInBits,
1390
1386
DBuilder.getOrCreateArray (Elements), EnumType,
1391
1387
llvm::dwarf::DW_LANG_Swift, MangledName, false );
1392
1388
1393
- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1394
- return DITy;
1389
+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1395
1390
}
1396
1391
1397
1392
// / Create debug information for an enum with no raw type.
@@ -1452,12 +1447,11 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1452
1447
Scope, {}, File, Line, SizeInBits, AlignInBits, Flags, nullptr ,
1453
1448
DBuilder.getOrCreateArray (Elements), /* UniqueIdentifier=*/ " " );
1454
1449
1455
- auto DITy = DBuilder.createStructType (
1450
+ llvm::DICompositeType * DITy = DBuilder.createStructType (
1456
1451
Scope, Name, File, Line, SizeInBits, AlignInBits, Flags, nullptr ,
1457
1452
DBuilder.getOrCreateArray (VPTy), llvm::dwarf::DW_LANG_Swift, nullptr ,
1458
1453
MangledName, nullptr , NumExtraInhabitants ? *NumExtraInhabitants : 0 );
1459
- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1460
- return DITy;
1454
+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1461
1455
}
1462
1456
1463
1457
// Create debug information for an enum with no raw type.
@@ -1506,12 +1500,11 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1506
1500
AlignInBits, Flags, nullptr ,
1507
1501
DBuilder.getOrCreateArray (Elements));
1508
1502
1509
- auto DITy = DBuilder.createStructType (
1503
+ llvm::DICompositeType * DITy = DBuilder.createStructType (
1510
1504
Scope, Name, File, Line, SizeInBits, AlignInBits, Flags, nullptr ,
1511
1505
DBuilder.getOrCreateArray (VPTy), llvm::dwarf::DW_LANG_Swift, nullptr ,
1512
1506
MangledName, nullptr , NumExtraInhabitants.value_or (0 ));
1513
- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1514
- return DITy;
1507
+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1515
1508
}
1516
1509
1517
1510
llvm::DICompositeType *createEnumType (CompletedDebugTypeInfo DbgTy,
@@ -1721,8 +1714,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1721
1714
DITy = createPointerSizedStruct (Scope, MangledName, FnTy, MainFile, 0 ,
1722
1715
Flags, MangledName);
1723
1716
}
1724
- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1725
- return DITy;
1717
+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1726
1718
}
1727
1719
1728
1720
llvm::DIType *createTuple (DebugTypeInfo DbgTy, llvm::DIScope *Scope,
@@ -1749,14 +1741,13 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1749
1741
DbgTy.getType (), Scope, MainFile, 0 , SizeInBits, AlignInBits, Flags,
1750
1742
MangledName, MangledName);
1751
1743
1752
- auto DITy = DBuilder.createStructType (
1744
+ llvm::DICompositeType * DITy = DBuilder.createStructType (
1753
1745
Scope, MangledName, MainFile, 0 , SizeInBits, AlignInBits, Flags,
1754
1746
nullptr , // DerivedFrom
1755
1747
DBuilder.getOrCreateArray (Elements), llvm::dwarf::DW_LANG_Swift,
1756
1748
nullptr , MangledName);
1757
1749
1758
- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1759
- return DITy;
1750
+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1760
1751
}
1761
1752
1762
1753
llvm::DICompositeType *
@@ -2124,13 +2115,12 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
2124
2115
Protocols.push_back (
2125
2116
DBuilder.createInheritance (FwdDecl.get (), PDITy, 0 , 0 , Flags));
2126
2117
}
2127
- auto DITy = DBuilder.createStructType (
2118
+ llvm::DICompositeType * DITy = DBuilder.createStructType (
2128
2119
Scope, MangledName, L.File , FwdDeclLine, SizeInBits, AlignInBits,
2129
2120
Flags, DerivedFrom, DBuilder.getOrCreateArray (Protocols),
2130
2121
llvm::dwarf::DW_LANG_Swift, nullptr );
2131
2122
2132
- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
2133
- return DITy;
2123
+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
2134
2124
}
2135
2125
2136
2126
case TypeKind::ExistentialMetatype:
0 commit comments