@@ -1060,7 +1060,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1060
1060
llvm::DIFile *File, unsigned Line, unsigned SizeInBits,
1061
1061
llvm::DINode::DIFlags Flags, StringRef UniqueID, StringRef Name) {
1062
1062
// Forward declare this first because types may be recursive.
1063
- auto FwdDecl = llvm::TempDIType (DBuilder.createReplaceableCompositeType (
1063
+ llvm::TempDICompositeType FwdDecl (DBuilder.createReplaceableCompositeType (
1064
1064
llvm::dwarf::DW_TAG_structure_type, Name, Scope, File, Line,
1065
1065
llvm::dwarf::DW_LANG_Swift, SizeInBits, 0 , Flags, UniqueID));
1066
1066
@@ -1232,7 +1232,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1232
1232
// Default, since Swift doesn't allow specifying a custom alignment.
1233
1233
unsigned AlignInBits = 0 ;
1234
1234
1235
- auto FwdDecl = llvm::TempDIType (DBuilder.createReplaceableCompositeType (
1235
+ llvm::TempDICompositeType FwdDecl (DBuilder.createReplaceableCompositeType (
1236
1236
llvm::dwarf::DW_TAG_enumeration_type, MangledName, Scope, File, Line,
1237
1237
llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits, Flags,
1238
1238
MangledName));
@@ -1286,7 +1286,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1286
1286
1287
1287
// A variant part should actually be a child to a DW_TAG_structure_type
1288
1288
// according to the DWARF spec.
1289
- auto FwdDecl = llvm::TempDIType (DBuilder.createReplaceableCompositeType (
1289
+ llvm::TempDICompositeType FwdDecl (DBuilder.createReplaceableCompositeType (
1290
1290
llvm::dwarf::DW_TAG_structure_type, MangledName, Scope, File, Line,
1291
1291
llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits, Flags,
1292
1292
MangledName));
@@ -1361,7 +1361,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1361
1361
1362
1362
// A variant part should actually be a child to a DW_TAG_structure_type
1363
1363
// according to the DWARF spec.
1364
- auto FwdDecl = llvm::TempDIType (DBuilder.createReplaceableCompositeType (
1364
+ llvm::TempDICompositeType FwdDecl (DBuilder.createReplaceableCompositeType (
1365
1365
llvm::dwarf::DW_TAG_structure_type, MangledName, Scope, File, Line,
1366
1366
llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits, Flags,
1367
1367
MangledName));
@@ -1561,7 +1561,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1561
1561
unsigned SizeInBits, unsigned AlignInBits,
1562
1562
llvm::DINode::DIFlags Flags,
1563
1563
StringRef MangledName) {
1564
- auto FwdDecl = llvm::TempDINode (DBuilder.createReplaceableCompositeType (
1564
+ llvm::TempDICompositeType FwdDecl (DBuilder.createReplaceableCompositeType (
1565
1565
llvm::dwarf::DW_TAG_subroutine_type, MangledName, Scope, MainFile, 0 ,
1566
1566
llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits, Flags,
1567
1567
MangledName));
@@ -1627,7 +1627,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1627
1627
// FIXME: assert that SizeInBits == OffsetInBits.
1628
1628
SizeInBits = OffsetInBits;
1629
1629
1630
- auto FwdDecl = llvm::TempDINode (DBuilder.createReplaceableCompositeType (
1630
+ llvm::TempDICompositeType FwdDecl (DBuilder.createReplaceableCompositeType (
1631
1631
llvm::dwarf::DW_TAG_structure_type, MangledName, Scope, MainFile, 0 ,
1632
1632
llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits, Flags,
1633
1633
MangledName));
@@ -1951,7 +1951,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
1951
1951
auto DerivedFrom = Superclass.isNull ()
1952
1952
? nullptr
1953
1953
: getOrCreateDesugaredType (Superclass, DbgTy);
1954
- auto FwdDecl = llvm::TempDIType (DBuilder.createReplaceableCompositeType (
1954
+ llvm::TempDICompositeType FwdDecl (DBuilder.createReplaceableCompositeType (
1955
1955
llvm::dwarf::DW_TAG_structure_type, MangledName, Scope, L.File ,
1956
1956
FwdDeclLine, llvm::dwarf::DW_LANG_Swift, SizeInBits, AlignInBits,
1957
1957
Flags));
@@ -2307,7 +2307,7 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
2307
2307
// winning over a full definition.
2308
2308
auto *FwdDecl = DBuilder.createReplaceableCompositeType (
2309
2309
llvm::dwarf::DW_TAG_structure_type, MangledName, Scope, 0 , 0 ,
2310
- llvm::dwarf::DW_LANG_Swift, 0 , 0 , llvm::DINode::FlagFwdDecl );
2310
+ llvm::dwarf::DW_LANG_Swift);
2311
2311
FwdDeclTypes.emplace_back (
2312
2312
std::piecewise_construct, std::make_tuple (MangledName),
2313
2313
std::make_tuple (static_cast <llvm::Metadata *>(FwdDecl)));
@@ -2463,7 +2463,7 @@ void IRGenDebugInfoImpl::finalize() {
2463
2463
// Finalize all replaceable forward declarations.
2464
2464
auto finalize = [&](llvm::MDNode *FwdDeclType, llvm::MDNode *FullType,
2465
2465
llvm::MDString *UID = nullptr ) {
2466
- llvm::TempMDNode FwdDecl (cast<llvm::MDNode >(FwdDeclType));
2466
+ llvm::TempDICompositeType FwdDecl (cast<llvm::DICompositeType >(FwdDeclType));
2467
2467
llvm::Metadata *Replacement = FullType ? FullType : FwdDeclType;
2468
2468
llvm::Metadata *Replaced = DBuilder.replaceTemporary (
2469
2469
std::move (FwdDecl), cast<llvm::MDNode>(Replacement));
0 commit comments