@@ -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
@@ -4484,23 +4487,26 @@ void SwiftASTContext::RegisterSectionModules(
4484
4487
auto Result = swift::parseASTSection (*loader, section_data_ref, filter);
4485
4488
if (auto E = Result.takeError ()) {
4486
4489
std::string error = toString (std::move (E));
4487
- LOG_PRINTF (GetLog (LLDBLog::Types),
4488
- " failed to parse AST section %zu/%zu in image \" %s\" "
4489
- " (filter=\" %s\" ). %s" ,
4490
- n, total, module .GetFileSpec ().GetFilename ().GetCString (),
4491
- filter.str ().c_str (), error.c_str ());
4490
+ LOG_PRINTF (
4491
+ GetLog (LLDBLog::Types),
4492
+ " failed to parse AST section %zu/%zu in image \" %s\" "
4493
+ " (filter=\" %s\" ). %s" ,
4494
+ n, total,
4495
+ module .GetFileSpec ().GetFilename ().AsCString (" <unknown module>" ),
4496
+ filter.str ().c_str (), error.c_str ());
4492
4497
return ;
4493
4498
}
4494
4499
4495
4500
// Collect the Swift module names referenced by the AST.
4496
4501
for (auto module_name : *Result) {
4497
4502
module_names.push_back (module_name);
4498
- LOG_PRINTF (GetLog (LLDBLog::Types),
4499
- " parsed module \" %s\" from Swift AST section %zu/%zu in "
4500
- " image \" %s\" (filter=\" %s\" )." ,
4501
- module_name.c_str (), n, total,
4502
- module .GetFileSpec ().GetFilename ().GetCString (),
4503
- filter.str ().c_str ());
4503
+ LOG_PRINTF (
4504
+ GetLog (LLDBLog::Types),
4505
+ " parsed module \" %s\" from Swift AST section %zu/%zu in "
4506
+ " image \" %s\" (filter=\" %s\" )." ,
4507
+ module_name.c_str (), n, total,
4508
+ module .GetFileSpec ().GetFilename ().AsCString (" <unknown module>" ),
4509
+ filter.str ().c_str ());
4504
4510
}
4505
4511
};
4506
4512
@@ -4539,7 +4545,7 @@ void SwiftASTContext::ImportSectionModules(
4539
4545
LLDB_SCOPED_TIMER ();
4540
4546
4541
4547
Progress progress (" Loading Swift module dependencies" ,
4542
- module .GetFileSpec ().GetFilename ().AsCString (),
4548
+ module .GetFileSpec ().GetFilename ().GetString (),
4543
4549
module_names.size ());
4544
4550
4545
4551
size_t completion = 0 ;
0 commit comments