Use correct encoding for alias types

I got confused which field was which.
This commit is contained in:
Bill Currie 2020-02-19 20:53:50 +09:00
parent 6bcc2c49ab
commit 6bc803c72d
2 changed files with 4 additions and 3 deletions

View file

@ -495,8 +495,8 @@ dump_qfo_types (qfo_t *qfo, int base_address)
type->t.array.base, type->t.array.size);
break;
case ty_alias:
printf (" %s %-5x\n", QFO_GETSTR (qfo, type->t.alias.name),
type->t.alias.type);
printf (" %s %d %-5x\n", QFO_GETSTR (qfo, type->t.alias.name),
type->t.alias.type, type->t.alias.aux_type);
break;
case ty_class:
printf (" %-5x\n", type->t.class);

View file

@ -264,7 +264,8 @@ qfo_encode_alias (type_t *type)
def = qfo_new_encoding (type, sizeof (enc->t.alias));
enc = D_POINTER (qfot_type_t, def);
ENC_DEF (enc->t.alias.type, alias_type_def);
enc->t.alias.type = type->type;
ENC_DEF (enc->t.alias.aux_type, alias_type_def);
ENC_STR (enc->t.alias.name, type->name);
return def;
}