flag types defined as unions

The risc-v abi needs to know if a
type is defined as a union or not.

We cannot use nunion to obtain this
information because the risc-v abi
made the unfortunate decision of
treating

	union { int i; }

differently from

	int i;

So, instead, I introduce a single
bit flag 'isunion'.
This commit is contained in:
Quentin Carbonneaux 2022-03-08 15:49:01 +01:00
parent 349794f3e4
commit 9060981c10
5 changed files with 11 additions and 8 deletions

View file

@ -77,7 +77,7 @@ typclass(AClass *a, Typ *t)
a->size = sz;
a->align = t->align;
if (t->dark || sz > 16 || sz == 0) {
if (t->isdark || sz > 16 || sz == 0) {
/* large or unaligned structures are
* required to be passed in memory
*/