[Lldb-commits] [lldb] [lldb/Interpreter] Make ScriptedInterface Object creation more generic (PR #68052)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 24 10:05:55 PDT 2023


================
@@ -19,11 +19,11 @@
 namespace lldb_private {
 class ScriptedPlatformInterface : virtual public ScriptedInterface {
 public:
-  StructuredData::GenericSP
+  virtual llvm::Expected<StructuredData::GenericSP>
   CreatePluginObject(llvm::StringRef class_name, ExecutionContext &exe_ctx,
                      StructuredData::DictionarySP args_sp,
-                     StructuredData::Generic *script_obj = nullptr) override {
-    return {};
+                     StructuredData::Generic *script_obj = nullptr) {
+    llvm_unreachable("unimplemented!");
----------------
JDevlieghere wrote:

Could this be a pure virtual method? If not maybe something like "Cannot create an instance of an interface" would be a more informative error message.

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


More information about the lldb-commits mailing list