aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv/Section.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-02-19 10:20:19 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-02-19 10:20:19 -0700
commitb5b634e4e8a2a1fe32fba50ccd175257b4213936 (patch)
tree4eed625db81dd4d6907e386084df36ec3ac85687 /src/codegen/spirv/Section.zig
parentefdc94c10712f610e7de5e49fd9cd6f88b4bbbae (diff)
parent02f5d2673f1bb21e7329acdd664fed565ecd4317 (diff)
downloadzig-b5b634e4e8a2a1fe32fba50ccd175257b4213936.tar.gz
zig-b5b634e4e8a2a1fe32fba50ccd175257b4213936.zip
Merge remote-tracking branch 'origin/master' into llvm16
Diffstat (limited to 'src/codegen/spirv/Section.zig')
-rw-r--r--src/codegen/spirv/Section.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen/spirv/Section.zig b/src/codegen/spirv/Section.zig
index 83f594dcef..a76314f5fa 100644
--- a/src/codegen/spirv/Section.zig
+++ b/src/codegen/spirv/Section.zig
@@ -195,7 +195,7 @@ fn writeContextDependentNumber(section: *Section, operand: spec.LiteralContextDe
fn writeExtendedMask(section: *Section, comptime Operand: type, operand: Operand) void {
var mask: Word = 0;
- inline for (@typeInfo(Operand).Struct.fields) |field, bit| {
+ inline for (@typeInfo(Operand).Struct.fields, 0..) |field, bit| {
switch (@typeInfo(field.type)) {
.Optional => if (@field(operand, field.name) != null) {
mask |= 1 << @intCast(u5, bit);