IRGen: Fix enum lowering with -enable-resilience-bypass
The layout of an enum type will only use spare bits if the
payload types have a fixed size in all resilience domains
where they are visible. In practice, this means that:
- If the enum is internal or resilient, we can use spare bits
if the payload types are fixed size from inside the current
module.
- If the enum is public and not resilient, we can use spare bits
if the payload types are fixed size from all resilience
domains.
The bug was that the 'fixed size in all resilience domains'
check was returning true for resilient types when the
-enable-resilience-bypass flag was on. This is wrong, because
this meant that building a module with and without
-enable-resilience-bypass could produce different lowerings
for enum types.
Fixes <rdar://problem/40034143>.