stage1: Fix several bugs in constant generation

The codegen would sometimes change the LLVM type for some constants to
an unnamed structure in order to accomodate extra padding. This is fine
as long as the alignment of each field is still respected and it was not
the case for structure types, leading to ill-formed constants being
generated.

Optional types suffer from this to a lower extent as their layout is
quite lucky, the only missing piece was the tail padding.

Closes #4530
Closes #4594
Closes #4295
Closes my will to live
8e96922f31LemonBoy committed on 4/17/2020, 5:42:23 PM· committed by Andrew Kelleyparenta4b1242
4 files changedLine totals unavailable