diff options
Diffstat (limited to 'src/tools/wasm-shell.cpp')
-rw-r--r-- | src/tools/wasm-shell.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/tools/wasm-shell.cpp b/src/tools/wasm-shell.cpp index 09aaa023e..efa2c0ca4 100644 --- a/src/tools/wasm-shell.cpp +++ b/src/tools/wasm-shell.cpp @@ -166,20 +166,18 @@ run_asserts(Name moduleName, reportUnknownImport(import); } }); - ModuleUtils::iterDefinedTables(wasm, [&](Table* table) { - for (auto& segment : table->segments) { - for (auto name : segment.data) { - // spec tests consider it illegal to use spectest.print in a table - if (auto* import = wasm.getFunction(name)) { - if (import->imported() && import->module == SPECTEST && - import->base.startsWith(PRINT)) { - std::cerr << "cannot put spectest.print in table\n"; - invalid = true; - } + for (auto& segment : wasm.elementSegments) { + for (auto name : segment->data) { + // spec tests consider it illegal to use spectest.print in a table + if (auto* import = wasm.getFunction(name)) { + if (import->imported() && import->module == SPECTEST && + import->base.startsWith(PRINT)) { + std::cerr << "cannot put spectest.print in table\n"; + invalid = true; } } } - }); + } if (wasm.memory.imported()) { reportUnknownImport(&wasm.memory); } |