@@ -2157,10 +2157,11 @@ static std::string GetSDKPathFromDebugInfo(std::string m_description,
21572157 auto [sdk, found_mismatch] = std::move (*sdk_or_err);
21582158
21592159 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>" ));
21642165
21652166 return GetSDKPath (m_description, std::move (sdk));
21662167}
@@ -2558,9 +2559,10 @@ SwiftASTContext::CreateInstance(lldb::LanguageType language, Module &module,
25582559 swift_ast_sp->InitializeSearchPathOptions (module_search_paths,
25592560 framework_search_paths);
25602561 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>" ));
25642566 return {};
25652567 }
25662568
@@ -2608,10 +2610,11 @@ SwiftASTContext::CreateInstance(lldb::LanguageType language, Module &module,
26082610 swift_ast_sp->ImportSectionModules (module , module_names);
26092611 if (GetLog (LLDBLog::Types)) {
26102612 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 ()));
26152618 }
26162619 }
26172620
@@ -4512,23 +4515,26 @@ void SwiftASTContext::RegisterSectionModules(
45124515 auto Result = swift::parseASTSection (*loader, section_data_ref, filter);
45134516 if (auto E = Result.takeError ()) {
45144517 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 ());
45204525 return ;
45214526 }
45224527
45234528 // Collect the Swift module names referenced by the AST.
45244529 for (auto module_name : *Result) {
45254530 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 ());
45324538 }
45334539 };
45344540
@@ -4567,7 +4573,7 @@ void SwiftASTContext::ImportSectionModules(
45674573 LLDB_SCOPED_TIMER ();
45684574
45694575 Progress progress (" Loading Swift module dependencies" ,
4570- module .GetFileSpec ().GetFilename ().AsCString (),
4576+ module .GetFileSpec ().GetFilename ().GetString (),
45714577 module_names.size ());
45724578
45734579 size_t completion = 0 ;
0 commit comments