diff options
-rw-r--r-- | src/passes/Metrics.cpp | 4 | ||||
-rw-r--r-- | test/passes/metrics.txt | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/passes/Metrics.cpp b/src/passes/Metrics.cpp index a6d51adbf..a01ead073 100644 --- a/src/passes/Metrics.cpp +++ b/src/passes/Metrics.cpp @@ -54,6 +54,10 @@ struct Metrics : public WalkerPass<PostWalker<Metrics, UnifiedExpressionVisitor< } keys.push_back("[vars]"); counts["[vars]"] = vars; + // add functions + keys.push_back("[funcs]"); + counts["[funcs]"] = module->functions.size(); + // sort sort(keys.begin(), keys.end(), [](const char* a, const char* b) -> bool { return strcmp(b, a) > 0; }); diff --git a/test/passes/metrics.txt b/test/passes/metrics.txt index e1f67c583..9668954e3 100644 --- a/test/passes/metrics.txt +++ b/test/passes/metrics.txt @@ -1,4 +1,5 @@ Counts + [funcs] : 1 [total] : 18 [vars] : 1 binary : 1 |