[Lldb-commits] [lldb] [lldb] Check for abstract methods implementation in Scripted Plugin Objects (PR #71260)
Med Ismail Bennani via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 6 10:02:45 PST 2023
================
@@ -26,6 +26,10 @@ class ScriptedPlatformInterface : virtual public ScriptedInterface {
return {llvm::make_error<UnimplementedError>()};
}
+ llvm::SmallVector<llvm::StringLiteral> GetAbstractMethods() const override {
+ return {};
+ }
----------------
medismailben wrote:
The same way we instantiate a base `ScriptInterpreter` instance if we don't link with python. Because we use dynamic dispatch to get the right scripting interface from the script interpreter, we cannot make any of the Scripted affordance class abstract because we won't be able to instantiate them and hence, won't be able to implement `ScriptInterpreter::CreateScripted{Platform,Process,Thread}Interface`.
Another approach, that I'm not particularly keen on doing, is making them abstract and assert in the `ScriptInterpreter::CreateScripted{Platform,Process,Thread}Interface` methods. @JDevlieghere any thoughts ?
https://github.com/llvm/llvm-project/pull/71260
More information about the lldb-commits
mailing list