summaryrefslogtreecommitdiff
path: root/src/passes/ExtractFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/ExtractFunction.cpp')
-rw-r--r--src/passes/ExtractFunction.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/passes/ExtractFunction.cpp b/src/passes/ExtractFunction.cpp
index 34fb449d4..ca05b6108 100644
--- a/src/passes/ExtractFunction.cpp
+++ b/src/passes/ExtractFunction.cpp
@@ -46,7 +46,9 @@ struct ExtractFunction : public Pass {
}
// clear data
module->memory.segments.clear();
- module->table.segments.clear();
+ // TODO: if the extracted function contains a call_indirect, the referenced
+ // table should not be removed.
+ module->tables.clear();
// leave just an export for the thing we want
if (!module->getExportOrNull(name)) {
module->exports.clear();