aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-10-25 15:06:47 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-10-25 15:11:21 -0700
commit8509e7111d80a07e778aa2a57d58d2bea6945014 (patch)
treee7eedaf980ada713a6c3d2da3e6153751d03bed6 /src/codegen/llvm
parenta132190cad80669306705b72276e9641401426fb (diff)
downloadzig-8509e7111d80a07e778aa2a57d58d2bea6945014.tar.gz
zig-8509e7111d80a07e778aa2a57d58d2bea6945014.zip
stage2: fix switch on tagged union capture-by-pointer
* AstGen: always use `typeof` and never `typeof_elem` on the `switch_cond`/`switch_cond_ref` instruction because both variants return a value and not a pointer. - Delete the `typeof_elem` ZIR instruction since it is no longer needed. * Sema: validateUnionInit now recognizes a comptime mutable value and no longer emits a compile error saying "cannot evaluate constant expression" - Still to-do is detecting comptime union values in a function that is not being executed at compile-time. - This is still to-do for structs too. * Sema: when emitting a call AIR instruction, call resolveTypeLayout on all the parameter types as well as the return type. * `Type.structFieldOffset` now works for unions in addition to structs.
Diffstat (limited to 'src/codegen/llvm')
0 files changed, 0 insertions, 0 deletions