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