aboutsummaryrefslogtreecommitdiff
path: root/decl.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2021-04-07 16:01:47 -0700
committerMichael Forney <mforney@mforney.org>2021-07-02 01:01:55 -0700
commit9d6020dc4a53ec66e09f84219c804f489634aa1a (patch)
treeee8a684d860edacb6b70af0c7ede48a35c27c32a /decl.c
parent1647af781a279c070a1cd99fc8aeae1be9795084 (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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/decl.c b/decl.c
index 7460d04..9e89cea 100644
--- a/decl.c
+++ b/decl.c
@@ -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;