diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-08-26 13:52:41 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-08-29 06:35:14 +1000 |
| commit | 9ee0192095b7c8f9a0030b06c67474155f8ea9a0 (patch) | |
| tree | 48944ead54cf0a342d0a0072bd5df8c397cd2ece /compiler/rustc_interface/src | |
| parent | 223d16ebbde1bd309c58e853b053e14318e56b0e (diff) | |
| download | rust-9ee0192095b7c8f9a0030b06c67474155f8ea9a0.tar.gz rust-9ee0192095b7c8f9a0030b06c67474155f8ea9a0.zip | |
Add prefix to every line of `-Zhir-stats` output.
This is based on `-Zprint-type-sizes` which does the same thing. It makes the output provenance clearer, and helps with post-processing. E.g. if you have `-Zhir-stats` output from numerous compiler invocations you can now easily extract the pre-expansion stats separately from the post-expansion stats.
Diffstat (limited to 'compiler/rustc_interface/src')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 66c6a229b89..1d083f3ec80 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -69,7 +69,7 @@ pub fn parse<'a>(sess: &'a Session, input: &Input) -> PResult<'a, ast::Crate> { } if sess.opts.unstable_opts.hir_stats { - hir_stats::print_ast_stats(&krate, "PRE EXPANSION AST STATS"); + hir_stats::print_ast_stats(&krate, "PRE EXPANSION AST STATS", "ast-stats-1"); } Ok(krate) @@ -416,7 +416,7 @@ pub fn configure_and_expand( } if sess.opts.unstable_opts.hir_stats { - hir_stats::print_ast_stats(&krate, "POST EXPANSION AST STATS"); + hir_stats::print_ast_stats(&krate, "POST EXPANSION AST STATS", "ast-stats-2"); } resolver.resolve_crate(&krate); |
