aboutsummaryrefslogtreecommitdiff
path: root/src/Zir.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-03-16 04:11:41 -0400
committerGitHub <noreply@github.com>2023-03-16 04:11:41 -0400
commitbd242ce1ce9ef6ffb1af4432d892bf582dcdba8a (patch)
tree34caaa3f320e8830a5f1f1c93a4b5d70c0d192a8 /src/Zir.zig
parenta2c6ecd6dc0bdbe2396be9b055852324f16d34c9 (diff)
parent7177b3994626114e57bf8df36ca84fd942bac282 (diff)
downloadzig-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.zig6
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;
+ }
};
};