diff options
| author | Med Ismail Bennani <ismail@bennani.ma> | 2023-10-25 10:05:54 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-25 10:05:54 -0700 |
| commit | f22d82cef28a882cec4d242910933e9f5d7dcdce (patch) | |
| tree | 2a75ad93c317a3b302fd0829c72fb40530114feb /lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.h | |
| parent | 7ce613fc77af092dd6e9db71ce3747b75bc5616e (diff) | |
[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 <ismail@bennani.ma>
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.h')
| -rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.h index 02deecd15ede..e04f2d02ab1d 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPlatformPythonInterface.h @@ -22,7 +22,7 @@ class ScriptedPlatformPythonInterface : public ScriptedPlatformInterface, public: ScriptedPlatformPythonInterface(ScriptInterpreterPythonImpl &interpreter); - StructuredData::GenericSP + llvm::Expected<StructuredData::GenericSP> CreatePluginObject(const llvm::StringRef class_name, ExecutionContext &exe_ctx, StructuredData::DictionarySP args_sp, |
