zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit e5d21e10bc6e652a72cf22ad1b1cf8ba8692abbf (tree)
parent 84adbeb0773dd1375ea0d8106a0845022531110c
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Mon, 18 Jul 2022 13:36:41 -0700

Autodoc: skip docs when compile errors occur

Diffstat:
Msrc/Compilation.zig | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/Compilation.zig b/src/Compilation.zig @@ -2288,6 +2288,14 @@ pub fn update(comp: *Compilation) !void { return; } + if (comp.emit_docs) |doc_location| { + if (comp.bin_file.options.module) |module| { + var autodoc = Autodoc.init(module, doc_location); + defer autodoc.deinit(); + try autodoc.generateZirData(); + } + } + // Flush takes care of -femit-bin, but we still have -femit-llvm-ir, -femit-llvm-bc, and // -femit-asm to handle, in the case of C objects. comp.emitOthers(); @@ -2867,14 +2875,6 @@ pub fn performAllTheWork( } } - if (comp.emit_docs) |doc_location| { - if (comp.bin_file.options.module) |module| { - var autodoc = Autodoc.init(module, doc_location); - defer autodoc.deinit(); - try autodoc.generateZirData(); - } - } - if (!use_stage1) { const outdated_and_deleted_decls_frame = tracy.namedFrame("outdated_and_deleted_decls"); defer outdated_and_deleted_decls_frame.end();