[Lldb-commits] [lldb] [lldb] Use range-based for loops over plugins (PR #184837)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 6 10:24:10 PST 2026


================
@@ -223,23 +262,16 @@ class PluginManager {
 
   static bool UnregisterPlugin(LanguageRuntimeCreateInstance create_callback);
 
-  static LanguageRuntimeCreateInstance
-  GetLanguageRuntimeCreateCallbackAtIndex(uint32_t idx);
-
-  static LanguageRuntimeGetCommandObject
-  GetLanguageRuntimeGetCommandObjectAtIndex(uint32_t idx);
-
-  static LanguageRuntimeGetExceptionPrecondition
-  GetLanguageRuntimeGetExceptionPreconditionAtIndex(uint32_t idx);
+  static std::vector<LanguageRuntimeCallbacks> GetLanguageRuntimeCallbacks();
 
   // SystemRuntime
   static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description,
                              SystemRuntimeCreateInstance create_callback);
 
   static bool UnregisterPlugin(SystemRuntimeCreateInstance create_callback);
 
-  static SystemRuntimeCreateInstance
-  GetSystemRuntimeCreateCallbackAtIndex(uint32_t idx);
+  static std::vector<SystemRuntimeCreateInstance>
+  GetSystemRuntimeCreateCallbacks();
----------------
JDevlieghere wrote:

That's right, all the plugins operate on a snapshots (which is a copy) under the hood as of https://github.com/llvm/llvm-project/pull/184452, but the approach was adopted earlier when we needed a way to enable/disable plugins.

https://github.com/llvm/llvm-project/pull/184837


More information about the lldb-commits mailing list