summaryrefslogtreecommitdiff
path: root/src/passes/RemoveUnusedModuleElements.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/RemoveUnusedModuleElements.cpp')
-rw-r--r--src/passes/RemoveUnusedModuleElements.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/passes/RemoveUnusedModuleElements.cpp b/src/passes/RemoveUnusedModuleElements.cpp
index 686a95032..9268232b4 100644
--- a/src/passes/RemoveUnusedModuleElements.cpp
+++ b/src/passes/RemoveUnusedModuleElements.cpp
@@ -70,9 +70,9 @@ struct ReachabilityAnalyzer : public PostWalker<ReachabilityAnalyzer> {
: module(module) {
queue = roots;
// Globals used in memory/table init expressions are also roots
- for (auto& segment : module->memory.segments) {
- if (!segment.isPassive) {
- walk(segment.offset);
+ for (auto& segment : module->dataSegments) {
+ if (!segment->isPassive) {
+ walk(segment->offset);
}
}
for (auto& segment : module->elementSegments) {
@@ -365,9 +365,9 @@ struct RemoveUnusedModuleElements : public Pass {
if (!importsMemory) {
// The memory is unobservable to the outside, we can remove the
// contents.
- module->memory.segments.clear();
+ module->dataSegments.clear();
}
- if (module->memory.segments.empty()) {
+ if (module->dataSegments.empty()) {
module->memory.exists = false;
module->memory.module = module->memory.base = Name();
module->memory.initial = 0;