diff options
author | Alon Zakai <azakai@google.com> | 2022-08-04 14:07:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-04 14:07:07 -0700 |
commit | e5c8bf665054bbaeab79506c562684f34ef376db (patch) | |
tree | e347f3bda767f6d63c26f9f7ac30581f0dc4e723 | |
parent | 1e6196f1b17e43bc78bb14264b376eb09161799c (diff) | |
download | binaryen-e5c8bf665054bbaeab79506c562684f34ef376db.tar.gz binaryen-e5c8bf665054bbaeab79506c562684f34ef376db.tar.bz2 binaryen-e5c8bf665054bbaeab79506c562684f34ef376db.zip |
[NFC] Skip Directize pass if there are no tables (#4875)
-rw-r--r-- | src/passes/Directize.cpp | 4 |
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. |