@@ -1175,11 +1175,10 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
11751175 }
11761176
11771177 llvm::DINodeArray BoundParams = collectGenericParams (Type);
1178- auto DITy = createStruct (
1178+ llvm::DICompositeType * DITy = createStruct (
11791179 Scope, Name, File, Line, SizeInBits, AlignInBits, Flags, MangledName,
11801180 DBuilder.getOrCreateArray (Elements), BoundParams, SpecificationOf);
1181- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1182- return DITy;
1181+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
11831182 }
11841183
11851184 // / Creates debug info for a generic struct or class with archetypes (e.g.:
@@ -1219,11 +1218,10 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
12191218 Elements.push_back (DITy);
12201219 }
12211220
1222- auto DITy = DBuilder.createStructType (
1221+ llvm::DICompositeType * DITy = DBuilder.createStructType (
12231222 Scope, Name, File, Line, SizeInBits, AlignInBits, Flags, DerivedFrom,
12241223 DBuilder.getOrCreateArray (Elements), RuntimeLang, nullptr , UniqueID);
1225- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1226- return DITy;
1224+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
12271225 }
12281226
12291227 std::pair<bool , Type> getUnsubstitutedType (Type Ty, StringRef MangledName) {
@@ -1265,11 +1263,10 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
12651263 // Force the creation of the unsubstituted type, don't create it
12661264 // directly so it goes through all the caching/verification logic.
12671265 auto UnsubstitutedDITy = getOrCreateType (UnsubstitutedDbgTy);
1268- auto DIType = createOpaqueStruct (
1266+ llvm::DICompositeType * DIType = createOpaqueStruct (
12691267 Scope, " " , File, 0 , SizeInBits, AlignInBits, Flags, MangledName,
12701268 collectGenericParams (EnumTy), UnsubstitutedDITy);
1271- DBuilder.replaceTemporary (std::move (FwdDecl), DIType);
1272- return DIType;
1269+ return DBuilder.replaceTemporary (std::move (FwdDecl), DIType);
12731270 }
12741271
12751272 // / Create a DICompositeType from a specialized struct. A specialized type
@@ -1341,8 +1338,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
13411338 Scope, Decl ? Decl->getNameStr () : " " , File, Line, SizeInBits,
13421339 AlignInBits, Flags, MangledName, collectGenericParams (Type),
13431340 UnsubstitutedDITy);
1344- DBuilder.replaceTemporary (std::move (FwdDecl), SpecializedDITy);
1345- return SpecializedDITy;
1341+ return DBuilder.replaceTemporary (std::move (FwdDecl), SpecializedDITy);
13461342 }
13471343
13481344 // / Create debug information for an enum with a raw type (enum E : Int {}).
@@ -1385,13 +1381,12 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
13851381 }
13861382
13871383 auto EnumType = getOrCreateType (*ElemDbgTy);
1388- auto DITy = DBuilder.createEnumerationType (
1384+ llvm::DICompositeType * DITy = DBuilder.createEnumerationType (
13891385 Scope, Name, File, Line, SizeInBits, AlignInBits,
13901386 DBuilder.getOrCreateArray (Elements), EnumType,
13911387 llvm::dwarf::DW_LANG_Swift, MangledName, false );
13921388
1393- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1394- return DITy;
1389+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
13951390 }
13961391
13971392 // / Create debug information for an enum with no raw type.
@@ -1452,12 +1447,11 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
14521447 Scope, {}, File, Line, SizeInBits, AlignInBits, Flags, nullptr ,
14531448 DBuilder.getOrCreateArray (Elements), /* UniqueIdentifier=*/ " " );
14541449
1455- auto DITy = DBuilder.createStructType (
1450+ llvm::DICompositeType * DITy = DBuilder.createStructType (
14561451 Scope, Name, File, Line, SizeInBits, AlignInBits, Flags, nullptr ,
14571452 DBuilder.getOrCreateArray (VPTy), llvm::dwarf::DW_LANG_Swift, nullptr ,
14581453 MangledName, nullptr , NumExtraInhabitants ? *NumExtraInhabitants : 0 );
1459- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1460- return DITy;
1454+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
14611455 }
14621456
14631457 // Create debug information for an enum with no raw type.
@@ -1506,12 +1500,11 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
15061500 AlignInBits, Flags, nullptr ,
15071501 DBuilder.getOrCreateArray (Elements));
15081502
1509- auto DITy = DBuilder.createStructType (
1503+ llvm::DICompositeType * DITy = DBuilder.createStructType (
15101504 Scope, Name, File, Line, SizeInBits, AlignInBits, Flags, nullptr ,
15111505 DBuilder.getOrCreateArray (VPTy), llvm::dwarf::DW_LANG_Swift, nullptr ,
15121506 MangledName, nullptr , NumExtraInhabitants.value_or (0 ));
1513- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1514- return DITy;
1507+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
15151508 }
15161509
15171510 llvm::DICompositeType *createEnumType (CompletedDebugTypeInfo DbgTy,
@@ -1721,8 +1714,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
17211714 DITy = createPointerSizedStruct (Scope, MangledName, FnTy, MainFile, 0 ,
17221715 Flags, MangledName);
17231716 }
1724- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1725- return DITy;
1717+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
17261718 }
17271719
17281720 llvm::DIType *createTuple (DebugTypeInfo DbgTy, llvm::DIScope *Scope,
@@ -1749,14 +1741,13 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
17491741 DbgTy.getType (), Scope, MainFile, 0 , SizeInBits, AlignInBits, Flags,
17501742 MangledName, MangledName);
17511743
1752- auto DITy = DBuilder.createStructType (
1744+ llvm::DICompositeType * DITy = DBuilder.createStructType (
17531745 Scope, MangledName, MainFile, 0 , SizeInBits, AlignInBits, Flags,
17541746 nullptr , // DerivedFrom
17551747 DBuilder.getOrCreateArray (Elements), llvm::dwarf::DW_LANG_Swift,
17561748 nullptr , MangledName);
17571749
1758- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
1759- return DITy;
1750+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
17601751 }
17611752
17621753 llvm::DICompositeType *
@@ -2124,13 +2115,12 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
21242115 Protocols.push_back (
21252116 DBuilder.createInheritance (FwdDecl.get (), PDITy, 0 , 0 , Flags));
21262117 }
2127- auto DITy = DBuilder.createStructType (
2118+ llvm::DICompositeType * DITy = DBuilder.createStructType (
21282119 Scope, MangledName, L.File , FwdDeclLine, SizeInBits, AlignInBits,
21292120 Flags, DerivedFrom, DBuilder.getOrCreateArray (Protocols),
21302121 llvm::dwarf::DW_LANG_Swift, nullptr );
21312122
2132- DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
2133- return DITy;
2123+ return DBuilder.replaceTemporary (std::move (FwdDecl), DITy);
21342124 }
21352125
21362126 case TypeKind::ExistentialMetatype:
0 commit comments