authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-07-18 13:36:41-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-07-19 19:10:12-07:00
loge5d21e10bc6e652a72cf22ad1b1cf8ba8692abbf
treeda12391511368c5f2821664acf07331358a6f03f
parent84adbeb0773dd1375ea0d8106a0845022531110c

Autodoc: skip docs when compile errors occur


1 files changed, 8 insertions(+), 8 deletions(-)

src/Compilation.zig+8-8
......@@ -2288,6 +2288,14 @@ pub fn update(comp: *Compilation) !void {
22882288 return;
22892289 }
22902290
2291 if (comp.emit_docs) |doc_location| {
2292 if (comp.bin_file.options.module) |module| {
2293 var autodoc = Autodoc.init(module, doc_location);
2294 defer autodoc.deinit();
2295 try autodoc.generateZirData();
2296 }
2297 }
2298
22912299 // Flush takes care of -femit-bin, but we still have -femit-llvm-ir, -femit-llvm-bc, and
22922300 // -femit-asm to handle, in the case of C objects.
22932301 comp.emitOthers();
......@@ -2867,14 +2875,6 @@ pub fn performAllTheWork(
28672875 }
28682876 }
28692877
2870 if (comp.emit_docs) |doc_location| {
2871 if (comp.bin_file.options.module) |module| {
2872 var autodoc = Autodoc.init(module, doc_location);
2873 defer autodoc.deinit();
2874 try autodoc.generateZirData();
2875 }
2876 }
2877
28782878 if (!use_stage1) {
28792879 const outdated_and_deleted_decls_frame = tracy.namedFrame("outdated_and_deleted_decls");
28802880 defer outdated_and_deleted_decls_frame.end();