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

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 6 10:17:13 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();
----------------
adrian-prantl wrote:

Are these functions returning a vector instead of an ArrayRef for thread safety?

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


More information about the lldb-commits mailing list