diff options
Diffstat (limited to 'src/passes/NameList.cpp')
-rw-r--r-- | src/passes/NameList.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/passes/NameList.cpp b/src/passes/NameList.cpp index ebc3a5c55..6b1d528e4 100644 --- a/src/passes/NameList.cpp +++ b/src/passes/NameList.cpp @@ -20,15 +20,16 @@ #include "wasm.h" #include "pass.h" +#include "ir/module-utils.h" #include "ir/utils.h" namespace wasm { struct NameList : public Pass { void run(PassRunner* runner, Module* module) override { - for (auto& func : module->functions) { + ModuleUtils::iterDefinedFunctions(*module, [&](Function* func) { std::cout << " " << func->name << " : " << Measurer::measure(func->body) << '\n'; - } + }); } }; |