diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-03-16 04:11:41 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-16 04:11:41 -0400 |
| commit | bd242ce1ce9ef6ffb1af4432d892bf582dcdba8a (patch) | |
| tree | 34caaa3f320e8830a5f1f1c93a4b5d70c0d192a8 /src/Zir.zig | |
| parent | a2c6ecd6dc0bdbe2396be9b055852324f16d34c9 (diff) | |
| parent | 7177b3994626114e57bf8df36ca84fd942bac282 (diff) | |
| download | zig-bd242ce1ce9ef6ffb1af4432d892bf582dcdba8a.tar.gz zig-bd242ce1ce9ef6ffb1af4432d892bf582dcdba8a.zip | |
Merge pull request #14647 from ziglang/build-parallel
zig build: run steps in parallel
Diffstat (limited to 'src/Zir.zig')
| -rw-r--r-- | src/Zir.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Zir.zig b/src/Zir.zig index 65e2f21cc9..001c4e8101 100644 --- a/src/Zir.zig +++ b/src/Zir.zig @@ -3594,6 +3594,12 @@ pub const Inst = struct { /// 0 or a payload index of a `Block`, each is a payload /// index of another `Item`. notes: u32, + + pub fn notesLen(item: Item, zir: Zir) u32 { + if (item.notes == 0) return 0; + const block = zir.extraData(Block, item.notes); + return block.data.body_len; + } }; }; |
