[Lldb-commits] [lldb] b8ea714 - [lldb] Fix formatting in ModuleList (NFC) (#190382)

via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 3 11:24:56 PDT 2026


Author: Jonas Devlieghere
Date: 2026-04-03T18:24:50Z
New Revision: b8ea714224daa13b0b74e2bfea3851ad25db14ea

URL: https://github.com/llvm/llvm-project/commit/b8ea714224daa13b0b74e2bfea3851ad25db14ea
DIFF: https://github.com/llvm/llvm-project/commit/b8ea714224daa13b0b74e2bfea3851ad25db14ea.diff

LOG: [lldb] Fix formatting in ModuleList (NFC) (#190382)

I had auto-merge enabled in #189444 and since the formatter is
non-blocking it got merged despite the issue. Given I'm already here, I
just formatted the whole file.

Added: 
    

Modified: 
    lldb/source/Core/ModuleList.cpp

Removed: 
    


################################################################################
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<std::recursive_mutex, std::recursive_mutex> lock(


        


More information about the lldb-commits mailing list