diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp index 34d609bb22d8f..fae42cb90a7fb 100644 --- a/lldb/source/Core/ModuleList.cpp +++ b/lldb/source/Core/ModuleList.cpp @@ -1006,9 +1006,8 @@ struct SharedModuleListInfo { SharedModuleList module_list; ModuleListProperties module_list_properties; }; -} -static SharedModuleListInfo &GetSharedModuleListInfo() -{ +} // namespace +static SharedModuleListInfo &GetSharedModuleListInfo() { static SharedModuleListInfo *g_shared_module_list_info = nullptr; static llvm::once_flag g_once_flag; llvm::call_once(g_once_flag, []() { @@ -1141,9 +1140,8 @@ ModuleList::GetSharedModule(const ModuleSpec &module_spec, ModuleSP &module_sp, if (uuid_ptr && *uuid_ptr != module_sp->GetUUID()) { module_sp.reset(); } else { - if (module_sp->GetObjectFile() && - module_sp->GetObjectFile()->GetType() == - ObjectFile::eTypeStubLibrary) { + if (module_sp->GetObjectFile() && module_sp->GetObjectFile()->GetType() == + ObjectFile::eTypeStubLibrary) { module_sp.reset(); } else { if (did_create_ptr) { @@ -1391,7 +1389,7 @@ bool ModuleList::LoadScriptingResourceInTargetForModule(Module &module, case eLoadScriptFromSymFileWarn: debugger.ReportWarning( llvm::formatv( - // clang-format off + // clang-format off R"('{0}' contains a debug script. To run this script in this debug session: command script import "{1}" @@ -1400,7 +1398,7 @@ To run all discovered debug scripts in this session: settings set target.load-script-from-symbol-file true )", - // clang-format on + // clang-format on module.GetFileSpec().GetFileNameStrippingExtension(), scripting_fspec.GetPath()), debugger.GetID()); @@ -1479,7 +1477,6 @@ bool ModuleList::AnyOf( return false; } - void ModuleList::Swap(ModuleList &other) { // scoped_lock locks both mutexes at once. std::scoped_lock lock(