@@ -110,7 +110,7 @@ class Module {
110
110
Module& operator =(const Module&) = delete ;
111
111
Module (Module&&) = delete ;
112
112
Module& operator =(Module&&) = delete ;
113
-
113
+ virtual ~Module () = default ;
114
114
/* *
115
115
* Loads the program if needed.
116
116
*
@@ -119,8 +119,7 @@ class Module {
119
119
*
120
120
* @returns An Error to indicate success or failure of the loading process.
121
121
*/
122
- ET_NODISCARD
123
- runtime::Error load (
122
+ ET_NODISCARD virtual runtime::Error load (
124
123
const Program::Verification verification =
125
124
Program::Verification::Minimal);
126
125
@@ -129,7 +128,7 @@ class Module {
129
128
*
130
129
* @returns true if the program is loaded, false otherwise.
131
130
*/
132
- inline bool is_loaded () const {
131
+ virtual inline bool is_loaded () const {
133
132
return program_ != nullptr ;
134
133
}
135
134
@@ -242,8 +241,7 @@ class Module {
242
241
* @returns A Result object containing either a vector of output values
243
242
* from the method or an error to indicate failure.
244
243
*/
245
- ET_NODISCARD
246
- runtime::Result<std::vector<runtime::EValue>> execute (
244
+ ET_NODISCARD virtual runtime::Result<std::vector<runtime::EValue>> execute (
247
245
const std::string& method_name,
248
246
const std::vector<runtime::EValue>& input_values);
249
247
0 commit comments