[Lldb-commits] [lldb] 86f7f08 - Fix return value of 'PluginManager::RegisterPlugin()'. (#114120)

via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 26 08:29:28 PST 2024


Author: Miro Bucko
Date: 2024-11-26T11:29:24-05:00
New Revision: 86f7f089ee6bcf01bf082ca802220b1143a3ade9

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

LOG: Fix return value of 'PluginManager::RegisterPlugin()'. (#114120)

Added: 
    

Modified: 
    lldb/source/Core/PluginManager.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Core/PluginManager.cpp b/lldb/source/Core/PluginManager.cpp
index a5219025495a91..80c9465f9af721 100644
--- a/lldb/source/Core/PluginManager.cpp
+++ b/lldb/source/Core/PluginManager.cpp
@@ -206,10 +206,9 @@ template <typename Instance> class PluginInstances {
     if (!callback)
       return false;
     assert(!name.empty());
-    Instance instance =
-        Instance(name, description, callback, std::forward<Args>(args)...);
-    m_instances.push_back(instance);
-    return false;
+    m_instances.emplace_back(name, description, callback,
+                             std::forward<Args>(args)...);
+    return true;
   }
 
   bool UnregisterPlugin(typename Instance::CallbackType callback) {


        


More information about the lldb-commits mailing list