summaryrefslogtreecommitdiff
path: root/src/passes/LegalizeJSInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/LegalizeJSInterface.cpp')
-rw-r--r--src/passes/LegalizeJSInterface.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/passes/LegalizeJSInterface.cpp b/src/passes/LegalizeJSInterface.cpp
index e8a604326..0a991caa5 100644
--- a/src/passes/LegalizeJSInterface.cpp
+++ b/src/passes/LegalizeJSInterface.cpp
@@ -97,12 +97,10 @@ struct LegalizeJSInterface : public Pass {
// we need to use the legalized version in the tables, as the import
// from JS is legal for JS. Our stub makes it look like a native wasm
// function.
- for (auto& table : module->tables) {
- for (auto& segment : table->segments) {
- for (auto& name : segment.data) {
- if (name == im->name) {
- name = funcName;
- }
+ for (auto& segment : module->elementSegments) {
+ for (auto& name : segment->data) {
+ if (name == im->name) {
+ name = funcName;
}
}
}