summaryrefslogtreecommitdiff
path: root/src/passes/opt-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/opt-utils.h')
-rw-r--r--src/passes/opt-utils.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/passes/opt-utils.h b/src/passes/opt-utils.h
index 0a67a7e1e..27a3c5c25 100644
--- a/src/passes/opt-utils.h
+++ b/src/passes/opt-utils.h
@@ -86,13 +86,12 @@ inline void replaceFunctions(PassRunner* runner,
// replace direct calls
FunctionRefReplacer(maybeReplace).run(runner, &module);
// replace in table
- for (auto& table : module.tables) {
- for (auto& segment : table->segments) {
- for (auto& name : segment.data) {
- maybeReplace(name);
- }
+ for (auto& segment : module.elementSegments) {
+ for (auto& name : segment->data) {
+ maybeReplace(name);
}
}
+
// replace in start
if (module.start.is()) {
maybeReplace(module.start);