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.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/passes/RemoveUnusedModuleElements.cpp b/src/passes/RemoveUnusedModuleElements.cpp
index 93cc33563..9449f9034 100644
--- a/src/passes/RemoveUnusedModuleElements.cpp
+++ b/src/passes/RemoveUnusedModuleElements.cpp
@@ -364,8 +364,7 @@ struct RemoveUnusedModuleElements : public Pass {
ModuleElement(ModuleElementKind::Tag, curr->name)) == 0;
});
module->removeElementSegments([&](ElementSegment* curr) {
- return curr->data.empty() ||
- analyzer.reachable.count(ModuleElement(
+ return analyzer.reachable.count(ModuleElement(
ModuleElementKind::ElementSegment, curr->name)) == 0;
});
// Since we've removed all empty element segments, here we mark all tables