From f22d82cef28a882cec4d242910933e9f5d7dcdce Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Wed, 25 Oct 2023 10:05:54 -0700 Subject: [lldb/Interpreter] Make ScriptedInterface Object creation more generic (#68052) This patch changes the way plugin objects used with Scripted Interfaces are created. Instead of implementing a different SWIG method to create the object for every scripted interface, this patch makes the creation more generic by re-using some of the ScriptedPythonInterface templated Dispatch code. This patch also improves error handling of the object creation by returning an `llvm::Expected`. Signed-off-by: Med Ismail Bennani Signed-off-by: Med Ismail Bennani --- .../Python/Interfaces/ScriptedProcessPythonInterface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h index 11330f5591b7..f3cff619f662 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.h @@ -23,7 +23,7 @@ class ScriptedProcessPythonInterface : public ScriptedProcessInterface, public: ScriptedProcessPythonInterface(ScriptInterpreterPythonImpl &interpreter); - StructuredData::GenericSP + llvm::Expected CreatePluginObject(const llvm::StringRef class_name, ExecutionContext &exe_ctx, StructuredData::DictionarySP args_sp, -- cgit v1.2.3