https://github.com/mbucko updated https://github.com/llvm/llvm-project/pull/114120
>From 362d6f52709ddf303d9d9fa256526182ba60fa53 Mon Sep 17 00:00:00 2001 From: Miro Bucko <mbu...@meta.com> Date: Tue, 29 Oct 2024 13:02:21 -0700 Subject: [PATCH] Fix return value of 'PluginManager::RegisterPlugin()'. --- lldb/source/Core/PluginManager.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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) { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits