aboutsummaryrefslogtreecommitdiff
path: root/src/stage1/codegen.cpp
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2020-12-05 18:59:55 +0100
committerLemonBoy <thatlemon@gmail.com>2020-12-05 20:14:04 +0100
commit97f36d93f4766a8d225d19665309e825cdef72bf (patch)
treea2bf281da218754ddd558cbe0fc03d2e741ef145 /src/stage1/codegen.cpp
parent0f7954831a881c899002eaf8c203aec35dedeeee (diff)
downloadzig-97f36d93f4766a8d225d19665309e825cdef72bf.tar.gz
zig-97f36d93f4766a8d225d19665309e825cdef72bf.zip
stage1: Don't fold single-element enums too aggressively
When the tag type is not a zero-sized type (eg. `enum(i32)`) we absolutely need to avoid constant-folding this values. Doing so masked any invalid input and, since the folding was not even applied consistently, introduced some hard to catch errors.
Diffstat (limited to 'src/stage1/codegen.cpp')
0 files changed, 0 insertions, 0 deletions