From 9ee0192095b7c8f9a0030b06c67474155f8ea9a0 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Fri, 26 Aug 2022 13:52:41 +1000 Subject: 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. --- compiler/rustc_interface/src/passes.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_interface/src') 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); -- cgit 1.4.1-3-g733a5