summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/passes/Directize.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/passes/Directize.cpp b/src/passes/Directize.cpp
index e338272a9..5ef870476 100644
--- a/src/passes/Directize.cpp
+++ b/src/passes/Directize.cpp
@@ -159,6 +159,10 @@ private:
struct Directize : public Pass {
void run(PassRunner* runner, Module* module) override {
+ if (module->tables.empty()) {
+ return;
+ }
+
// Find which tables are valid to optimize on. They must not be imported nor
// exported (so the outside cannot modify them), and must have no sets in
// any part of the module.