summaryrefslogtreecommitdiff
path: root/src/ir/table-utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/table-utils.cpp')
-rw-r--r--src/ir/table-utils.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ir/table-utils.cpp b/src/ir/table-utils.cpp
index ef89e50f3..639f8fbe6 100644
--- a/src/ir/table-utils.cpp
+++ b/src/ir/table-utils.cpp
@@ -31,11 +31,9 @@ std::set<Name> getFunctionsNeedingElemDeclare(Module& wasm) {
// Find all the names in the tables.
std::unordered_set<Name> tableNames;
- for (auto& table : wasm.tables) {
- for (auto& segment : table->segments) {
- for (auto name : segment.data) {
- tableNames.insert(name);
- }
+ for (auto& segment : wasm.elementSegments) {
+ for (auto name : segment->data) {
+ tableNames.insert(name);
}
}