diff options
author | Michael Forney <mforney@mforney.org> | 2021-04-07 16:01:47 -0700 |
---|---|---|
committer | Michael Forney <mforney@mforney.org> | 2021-07-02 01:01:55 -0700 |
commit | 9d6020dc4a53ec66e09f84219c804f489634aa1a (patch) | |
tree | ee8a684d860edacb6b70af0c7ede48a35c27c32a /decl.c | |
parent | 1647af781a279c070a1cd99fc8aeae1be9795084 (diff) |
qbe: Remove repr from struct value and use per-instruction class instead
This way we avoid leaking backend-specific details of type
representation outside qbe.c. It also facilitates some future
simplifications.
Diffstat (limited to 'decl.c')
-rw-r--r-- | decl.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -183,7 +183,6 @@ tagspec(struct scope *s) t = mktype(kind, PROPOBJECT); if (kind == TYPESTRUCT) t->prop |= PROPAGGR; - t->repr = &i64; // XXX t->size = 0; t->align = 0; t->structunion.tag = tag; @@ -234,7 +233,7 @@ tagspec(struct scope *s) error(&tok.loc, "enumerator '%s' value cannot be represented as 'int' or 'unsigned int'", name); } d = mkdecl(DECLCONST, &typeint, QUALNONE, LINKNONE); - d->value = mkintconst(t->repr, i); + d->value = mkintconst(i); if (i >= 1ull << 31 && i < 1ull << 63) { large = true; d->type = &typeuint; |