@@ -611,8 +611,8 @@ SwiftLanguageRuntimeImpl::GetNumChildren(CompilerType type,
611
611
}
612
612
// Structs and Tuples.
613
613
if (auto *rti = llvm::dyn_cast<swift::reflection::RecordTypeInfo>(ti)) {
614
- LLDB_LOGF (GetLog (LLDBLog::Types), " %s : RecordTypeInfo(num_fields=%i )" ,
615
- type.GetMangledTypeName (). GetCString () , rti->getNumFields ());
614
+ LLDB_LOG (GetLog (LLDBLog::Types), " {0} : RecordTypeInfo(num_fields={1} )" ,
615
+ type.GetMangledTypeName (), rti->getNumFields ());
616
616
switch (rti->getRecordKind ()) {
617
617
case swift::reflection::RecordKind::ExistentialMetatype:
618
618
case swift::reflection::RecordKind::ThickFunction:
@@ -630,15 +630,14 @@ SwiftLanguageRuntimeImpl::GetNumChildren(CompilerType type,
630
630
}
631
631
}
632
632
if (auto *eti = llvm::dyn_cast<swift::reflection::EnumTypeInfo>(ti)) {
633
- LLDB_LOGF (GetLog (LLDBLog::Types), " %s: EnumTypeInfo(num_payload_cases=%i)" ,
634
- type.GetMangledTypeName ().GetCString (),
635
- eti->getNumPayloadCases ());
633
+ LLDB_LOG (GetLog (LLDBLog::Types), " {0}: EnumTypeInfo(num_payload_cases={1})" ,
634
+ type.GetMangledTypeName (), eti->getNumPayloadCases ());
636
635
return eti->getNumPayloadCases ();
637
636
}
638
637
// Objects.
639
638
if (auto *rti = llvm::dyn_cast<swift::reflection::ReferenceTypeInfo>(ti)) {
640
- LLDB_LOGF (GetLog (LLDBLog::Types), " %s : ReferenceTypeInfo()" ,
641
- type.GetMangledTypeName ().GetCString ());
639
+ LLDB_LOG (GetLog (LLDBLog::Types), " {0} : ReferenceTypeInfo()" ,
640
+ type.GetMangledTypeName ().GetCString ());
642
641
switch (rti->getReferenceKind ()) {
643
642
case swift::reflection::ReferenceKind::Weak:
644
643
case swift::reflection::ReferenceKind::Unowned:
@@ -665,8 +664,8 @@ SwiftLanguageRuntimeImpl::GetNumChildren(CompilerType type,
665
664
if (auto *rti =
666
665
llvm::dyn_cast_or_null<swift::reflection::RecordTypeInfo>(cti)) {
667
666
LLDB_LOG (GetLog (LLDBLog::Types),
668
- " {0}: class RecordTypeInfo(num_fields=%i )" ,
669
- type.GetMangledTypeName (). GetCString () , rti->getNumFields ());
667
+ " {0}: class RecordTypeInfo(num_fields={1} )" ,
668
+ type.GetMangledTypeName (), rti->getNumFields ());
670
669
671
670
// The superclass, if any, is an extra child.
672
671
if (reflection_ctx->LookupSuperclass (tr,
@@ -679,7 +678,7 @@ SwiftLanguageRuntimeImpl::GetNumChildren(CompilerType type,
679
678
}
680
679
// FIXME: Implement more cases.
681
680
LLDB_LOG (GetLog (LLDBLog::Types), " {0}: unimplemented type info" ,
682
- type.GetMangledTypeName (). GetCString () );
681
+ type.GetMangledTypeName ());
683
682
return {};
684
683
}
685
684
@@ -1109,9 +1108,9 @@ CompilerType SwiftLanguageRuntimeImpl::GetChildCompilerTypeAtIndex(
1109
1108
});
1110
1109
1111
1110
if (supers.size () == 0 ) {
1112
- LLDB_LOGF (GetLog (LLDBLog::Types),
1113
- " Couldn't find the type metadata for %s in instance" ,
1114
- type.GetTypeName (). AsCString ());
1111
+ LLDB_LOG (GetLog (LLDBLog::Types),
1112
+ " Couldn't find the type metadata for {0} in instance" ,
1113
+ type.GetTypeName ());
1115
1114
return {};
1116
1115
}
1117
1116
@@ -1185,8 +1184,8 @@ CompilerType SwiftLanguageRuntimeImpl::GetChildCompilerTypeAtIndex(
1185
1184
i);
1186
1185
return {};
1187
1186
}
1188
- LLDB_LOGF (GetLog (LLDBLog::Types), " Cannot retrieve type information for %s " ,
1189
- type.GetTypeName (). AsCString ());
1187
+ LLDB_LOG (GetLog (LLDBLog::Types), " Cannot retrieve type information for {0} " ,
1188
+ type.GetTypeName ());
1190
1189
return {};
1191
1190
}
1192
1191
@@ -1311,8 +1310,8 @@ bool SwiftLanguageRuntimeImpl::GetDynamicTypeAndAddress_Pack(
1311
1310
++i;
1312
1311
}
1313
1312
if (!pack_expansion) {
1314
- LLDB_LOGF (log, " cannot decode pack_expansion type: failed to find a "
1315
- " matching type in the function signature" );
1313
+ LLDB_LOG (log, " cannot decode pack_expansion type: failed to find a "
1314
+ " matching type in the function signature" );
1316
1315
return {};
1317
1316
}
1318
1317
@@ -1324,10 +1323,10 @@ bool SwiftLanguageRuntimeImpl::GetDynamicTypeAndAddress_Pack(
1324
1323
llvm::Optional<lldb::addr_t > count =
1325
1324
GetTypeMetadataForTypeNameAndFrame (count_var, *frame);
1326
1325
if (!count) {
1327
- LLDB_LOGF (log,
1328
- " cannot decode pack_expansion type: failed to find count "
1329
- " argument \" %s\" in frame" ,
1330
- count_var.str (). c_str ());
1326
+ LLDB_LOG (log,
1327
+ " cannot decode pack_expansion type: failed to find count "
1328
+ " argument \" %s\" in frame" ,
1329
+ count_var.str ());
1331
1330
return {};
1332
1331
}
1333
1332
@@ -1354,11 +1353,11 @@ bool SwiftLanguageRuntimeImpl::GetDynamicTypeAndAddress_Pack(
1354
1353
llvm::Optional<lldb::addr_t > mds_ptr =
1355
1354
GetTypeMetadataForTypeNameAndFrame (mds_var, *frame);
1356
1355
if (!mds_ptr) {
1357
- LLDB_LOGF (log,
1356
+ LLDB_LOG (log,
1358
1357
" cannot decode pack_expansion type: failed to find "
1359
1358
" metadata "
1360
- " for \" %s \" in frame" ,
1361
- mds_var.str (). c_str () );
1359
+ " for \" {0} \" in frame" ,
1360
+ mds_var.str ());
1362
1361
error = true ;
1363
1362
return ;
1364
1363
}
@@ -2695,10 +2694,10 @@ SwiftLanguageRuntimeImpl::GetTypeRef(CompilerType type,
2695
2694
if (log && log->GetVerbose ()) {
2696
2695
std::stringstream ss;
2697
2696
type_ref->dump (ss);
2698
- LLDB_LOGF (log,
2699
- " [SwiftLanguageRuntimeImpl::GetTypeRef] Found typeref for "
2700
- " type: %s :\n %s " ,
2701
- type.GetMangledTypeName (). GetCString () , ss.str (). c_str ());
2697
+ LLDB_LOG (log,
2698
+ " [SwiftLanguageRuntimeImpl::GetTypeRef] Found typeref for "
2699
+ " type: {0} :\n {0} " ,
2700
+ type.GetMangledTypeName (), ss.str ());
2702
2701
}
2703
2702
return type_ref;
2704
2703
}
@@ -2710,9 +2709,9 @@ SwiftLanguageRuntimeImpl::GetSwiftRuntimeTypeInfo(
2710
2709
Log *log (GetLog (LLDBLog::Types));
2711
2710
2712
2711
if (log && log->GetVerbose ())
2713
- LLDB_LOGF (log, " [SwiftLanguageRuntimeImpl::GetSwiftRuntimeTypeInfo] Getting "
2714
- " type info for type: %s \n " ,
2715
- type.GetMangledTypeName (). GetCString ());
2712
+ LLDB_LOG (log, " [SwiftLanguageRuntimeImpl::GetSwiftRuntimeTypeInfo] Getting "
2713
+ " type info for type: {0} " ,
2714
+ type.GetMangledTypeName ());
2716
2715
2717
2716
auto ts = type.GetTypeSystem ().dyn_cast_or_null <TypeSystemSwift>();
2718
2717
if (!ts)
0 commit comments