Commit 898491a
committed
Respect trivially-destructible and copyable for zero-sized enum payloads
Only the non-zero-sized associated values of a type were considered
when determining whether an enum is copyable or was
trivially-destructible, meaning that a zero-sized, noncopyable type
with a `deinit` wouldn't get destroyed. Treat these associated values
as if they were a payload, and centralize the logic for figuring out
these overall aspects of the enum (copyable, trivially-destructible,
bitwise-takable) since the same checks were repeated.
Fixes rdar://118449507.1 parent 263c46a commit 898491a
File tree
3 files changed
+137
-51
lines changed- lib/IRGen
- test/IRGen
3 files changed
+137
-51
lines changed
0 commit comments