diff options
Diffstat (limited to 'src/passes/Inlining.cpp')
-rw-r--r-- | src/passes/Inlining.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/passes/Inlining.cpp b/src/passes/Inlining.cpp index 3f6263815..b69d8f7c2 100644 --- a/src/passes/Inlining.cpp +++ b/src/passes/Inlining.cpp @@ -31,6 +31,7 @@ #include <atomic> #include "ir/debug.h" +#include "ir/element-utils.h" #include "ir/literal-utils.h" #include "ir/module-utils.h" #include "ir/type-updating.h" @@ -350,11 +351,8 @@ struct Inlining : public Pass { infos[ex->value].usedGlobally = true; } } - for (auto& segment : module->elementSegments) { - for (auto name : segment->data) { - infos[name].usedGlobally = true; - } - } + ElementUtils::iterAllElementFunctionNames( + module, [&](Name name) { infos[name].usedGlobally = true; }); for (auto& global : module->globals) { if (!global->imported()) { |