aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm.zig
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-08-21 12:25:19 +0300
committerVeikka Tuominen <git@vexu.eu>2022-08-21 12:51:40 +0300
commitd48af541c7aa235948621cdbc250d983af303977 (patch)
tree8dbe65a62e708f182371b207896ebe33cf1586b4 /src/codegen/llvm.zig
parente8102d8738eafb969e03b0609c60be73326610eb (diff)
downloadzig-d48af541c7aa235948621cdbc250d983af303977.tar.gz
zig-d48af541c7aa235948621cdbc250d983af303977.zip
Sema: handle union and enum field order being different
Closes #12543
Diffstat (limited to 'src/codegen/llvm.zig')
-rw-r--r--src/codegen/llvm.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index d50b463606..5c537cd5bc 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -3502,7 +3502,7 @@ pub const DeclGen = struct {
});
}
const union_obj = tv.ty.cast(Type.Payload.Union).?.data;
- const field_index = union_obj.tag_ty.enumTagFieldIndex(tag_and_val.tag, dg.module).?;
+ const field_index = tv.ty.unionTagFieldIndex(tag_and_val.tag, dg.module).?;
assert(union_obj.haveFieldTypes());
// Sometimes we must make an unnamed struct because LLVM does