Helper function for getting the memory instance by index from the module.
| 45 | |
| 46 | /// Helper function for getting the memory instance by index from the module. |
| 47 | Instance::MemoryInstance *getMemoryByIndex(uint32_t Index) const noexcept { |
| 48 | if (Module) { |
| 49 | if (auto Res = Module->getMemory(Index); Res) { |
| 50 | return *Res; |
| 51 | } |
| 52 | } |
| 53 | return nullptr; |
| 54 | } |
| 55 | |
| 56 | private: |
| 57 | Executor::Executor *Exec; |