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 {...@@ -2288,6 +2288,14 @@ pub fn update(comp: *Compilation) !void {
2288 return;2288 return;
2289 }2289 }
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
2291 // Flush takes care of -femit-bin, but we still have -femit-llvm-ir, -femit-llvm-bc, and2299 // Flush takes care of -femit-bin, but we still have -femit-llvm-ir, -femit-llvm-bc, and
2292 // -femit-asm to handle, in the case of C objects.2300 // -femit-asm to handle, in the case of C objects.
2293 comp.emitOthers();2301 comp.emitOthers();
...@@ -2867,14 +2875,6 @@ pub fn performAllTheWork(...@@ -2867,14 +2875,6 @@ pub fn performAllTheWork(
2867 }2875 }
2868 }2876 }
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
2878 if (!use_stage1) {2878 if (!use_stage1) {
2879 const outdated_and_deleted_decls_frame = tracy.namedFrame("outdated_and_deleted_decls");2879 const outdated_and_deleted_decls_frame = tracy.namedFrame("outdated_and_deleted_decls");
2880 defer outdated_and_deleted_decls_frame.end();2880 defer outdated_and_deleted_decls_frame.end();