@@ -2156,10 +2156,11 @@ static std::string GetSDKPathFromDebugInfo(std::string m_description,
2156
2156
auto [sdk, found_mismatch] = std::move (*sdk_or_err);
2157
2157
2158
2158
if (found_mismatch)
2159
- HEALTH_LOG_PRINTF (" Unsupported mixing of public and internal SDKs in "
2160
- " '%s'. Mixed use of SDKs indicates use of different "
2161
- " toolchains, which is not supported." ,
2162
- module.GetFileSpec ().GetFilename ().GetCString ());
2159
+ HEALTH_LOG_PRINTF (
2160
+ " Unsupported mixing of public and internal SDKs in "
2161
+ " '%s'. Mixed use of SDKs indicates use of different "
2162
+ " toolchains, which is not supported." ,
2163
+ module.GetFileSpec ().GetFilename ().AsCString (" <unknown module>" ));
2163
2164
2164
2165
return GetSDKPath (m_description, std::move (sdk));
2165
2166
}
@@ -2557,9 +2558,10 @@ SwiftASTContext::CreateInstance(lldb::LanguageType language, Module &module,
2557
2558
swift_ast_sp->InitializeSearchPathOptions (module_search_paths,
2558
2559
framework_search_paths);
2559
2560
if (!swift_ast_sp->GetClangImporter ()) {
2560
- LOG_PRINTF (GetLog (LLDBLog::Types),
2561
- " (\" %s\" ) returning NULL - couldn't create a ClangImporter" ,
2562
- module.GetFileSpec ().GetFilename ().AsCString (" <anonymous>" ));
2561
+ LOG_PRINTF (
2562
+ GetLog (LLDBLog::Types),
2563
+ " (\" %s\" ) returning NULL - couldn't create a ClangImporter" ,
2564
+ module.GetFileSpec ().GetFilename ().AsCString (" <unknown module>" ));
2563
2565
return {};
2564
2566
}
2565
2567
@@ -2607,10 +2609,11 @@ SwiftASTContext::CreateInstance(lldb::LanguageType language, Module &module,
2607
2609
swift_ast_sp->ImportSectionModules (module, module_names);
2608
2610
if (GetLog (LLDBLog::Types)) {
2609
2611
std::lock_guard<std::recursive_mutex> locker (g_log_mutex);
2610
- LOG_PRINTF (GetLog (LLDBLog::Types), " ((Module*)%p, \" %s\" ) = %p" ,
2611
- static_cast <void *>(&module),
2612
- module.GetFileSpec ().GetFilename ().AsCString (" <anonymous>" ),
2613
- static_cast <void *>(swift_ast_sp.get ()));
2612
+ LOG_PRINTF (
2613
+ GetLog (LLDBLog::Types), " ((Module*)%p, \" %s\" ) = %p" ,
2614
+ static_cast <void *>(&module),
2615
+ module.GetFileSpec ().GetFilename ().AsCString (" <unknown module>" ),
2616
+ static_cast <void *>(swift_ast_sp.get ()));
2614
2617
}
2615
2618
}
2616
2619
@@ -4504,23 +4507,26 @@ void SwiftASTContext::RegisterSectionModules(
4504
4507
auto Result = swift::parseASTSection (*loader, section_data_ref, filter);
4505
4508
if (auto E = Result.takeError ()) {
4506
4509
std::string error = toString (std::move (E));
4507
- LOG_PRINTF (GetLog (LLDBLog::Types),
4508
- " failed to parse AST section %zu/%zu in image \" %s\" "
4509
- " (filter=\" %s\" ). %s" ,
4510
- n, total, module.GetFileSpec ().GetFilename ().GetCString (),
4511
- filter.str ().c_str (), error.c_str ());
4510
+ LOG_PRINTF (
4511
+ GetLog (LLDBLog::Types),
4512
+ " failed to parse AST section %zu/%zu in image \" %s\" "
4513
+ " (filter=\" %s\" ). %s" ,
4514
+ n, total,
4515
+ module.GetFileSpec ().GetFilename ().AsCString (" <unknown module>" ),
4516
+ filter.str ().c_str (), error.c_str ());
4512
4517
return ;
4513
4518
}
4514
4519
4515
4520
// Collect the Swift module names referenced by the AST.
4516
4521
for (auto module_name : *Result) {
4517
4522
module_names.push_back (module_name);
4518
- LOG_PRINTF (GetLog (LLDBLog::Types),
4519
- " parsed module \" %s\" from Swift AST section %zu/%zu in "
4520
- " image \" %s\" (filter=\" %s\" )." ,
4521
- module_name.c_str (), n, total,
4522
- module.GetFileSpec ().GetFilename ().GetCString (),
4523
- filter.str ().c_str ());
4523
+ LOG_PRINTF (
4524
+ GetLog (LLDBLog::Types),
4525
+ " parsed module \" %s\" from Swift AST section %zu/%zu in "
4526
+ " image \" %s\" (filter=\" %s\" )." ,
4527
+ module_name.c_str (), n, total,
4528
+ module.GetFileSpec ().GetFilename ().AsCString (" <unknown module>" ),
4529
+ filter.str ().c_str ());
4524
4530
}
4525
4531
};
4526
4532
@@ -4559,7 +4565,7 @@ void SwiftASTContext::ImportSectionModules(
4559
4565
LLDB_SCOPED_TIMER ();
4560
4566
4561
4567
Progress progress (" Loading Swift module dependencies" ,
4562
- module.GetFileSpec ().GetFilename ().AsCString (),
4568
+ module.GetFileSpec ().GetFilename ().GetString (),
4563
4569
module_names.size ());
4564
4570
4565
4571
size_t completion = 0 ;
0 commit comments