From f203334878d854c17c00c0447c748d9ea5e491e5 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 21 Jun 2021 13:25:48 -0700 Subject: [PATCH] stage2: wire up AstGen to the progress bar --- src/Compilation.zig | 6 +++++- src/Module.zig | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Compilation.zig b/src/Compilation.zig index ec8b0c79bb07368cb99df8885ef6933a6b24a0a8..e8b2d994f07e0fbb011b87d476ea75b47d75a112 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2283,8 +2283,12 @@ fn workerAstGenFile( ) void { defer wg.finish(); + var child_prog_node = prog_node.start(file.sub_file_path, 0); + child_prog_node.activate(); + defer child_prog_node.end(); + const mod = comp.bin_file.options.module.?; - mod.astGenFile(file, prog_node) catch |err| switch (err) { + mod.astGenFile(file) catch |err| switch (err) { error.AnalysisFail => return, else => { file.status = .retryable_failure; diff --git a/src/Module.zig b/src/Module.zig index e6bed16bbbfe95ddcbd0d043b069b61968edbf8f..af3cdeed4763592113b77daec6e045cc447ebddf 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -2211,8 +2211,7 @@ comptime { } } -pub fn astGenFile(mod: *Module, file: *Scope.File, prog_node: *std.Progress.Node) !void { - _ = prog_node; +pub fn astGenFile(mod: *Module, file: *Scope.File) !void { const tracy = trace(@src()); defer tracy.end(); -- 2.54.0