diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-06-03 10:48:14 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-06-03 10:48:14 -0700 |
commit | f0e79fc18be7013f43f79317836dc71d623c40d6 (patch) | |
tree | ea9ba4f6634fe6743f6fec93eb0daca557ae0e0e /src/ast_utils.h | |
parent | e2a6ee77c6acf518036259ca11c18e9abc834b19 (diff) | |
download | binaryen-f0e79fc18be7013f43f79317836dc71d623c40d6.tar.gz binaryen-f0e79fc18be7013f43f79317836dc71d623c40d6.tar.bz2 binaryen-f0e79fc18be7013f43f79317836dc71d623c40d6.zip |
add nm pass, that prints function names and sizes (#562)
Diffstat (limited to 'src/ast_utils.h')
-rw-r--r-- | src/ast_utils.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ast_utils.h b/src/ast_utils.h index ee5c76b69..600abd1b6 100644 --- a/src/ast_utils.h +++ b/src/ast_utils.h @@ -169,16 +169,16 @@ struct EffectAnalyzer : public PostWalker<EffectAnalyzer, Visitor<EffectAnalyzer // Meausure the size of an AST struct Measurer : public PostWalker<Measurer, UnifiedExpressionVisitor<Measurer>> { - size_t size = 0; + Index size = 0; void visitExpression(Expression* curr) { size++; } - static bool measure(Expression* tree) { + static Index measure(Expression* tree) { Measurer measurer; measurer.walk(tree); - return !!measurer.size; + return measurer.size; } }; |