From e5c8bf665054bbaeab79506c562684f34ef376db Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 4 Aug 2022 14:07:07 -0700 Subject: [NFC] Skip Directize pass if there are no tables (#4875) --- src/passes/Directize.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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. -- cgit v1.2.3