[qfcc] Fix missed t enum cleanup

This commit is contained in:
Bill Currie 2020-03-30 19:02:54 +09:00
parent 0de9b02726
commit dff0fd983c
2 changed files with 11 additions and 11 deletions

View File

@ -24,9 +24,9 @@ next_type (qfot_type_t *type)
int
check_alias (string name, qfot_type_t *alias)
{
if (alias.meta != ty_basic || alias.t.type != ev_pointer
|| alias.t.fldptr.aux_type.meta != ty_basic
|| alias.t.fldptr.aux_type.t.type != ev_integer) {
if (alias.meta != ty_basic || alias.type != ev_pointer
|| alias.fldptr.aux_type.meta != ty_basic
|| alias.fldptr.aux_type.type != ev_integer) {
printf ("%s is not a *int alias\n", name);
return 0;
}
@ -48,13 +48,13 @@ main (void)
((int *)type - (int *) encodings.types) < encodings.size;
type = next_type (type)) {
if (type.meta == ty_alias) {
if (type.t.alias.name == "foo") {
found_foo = check_alias (type.t.alias.name,
type.t.alias.aux_type);
if (type.alias.name == "foo") {
found_foo = check_alias (type.alias.name,
type.alias.aux_type);
}
if (type.t.alias.name == "bar") {
found_bar = check_alias (type.t.alias.name,
type.t.alias.aux_type);
if (type.alias.name == "bar") {
found_bar = check_alias (type.alias.name,
type.alias.aux_type);
}
}
}

View File

@ -28,10 +28,10 @@ main (void)
((int *)type - (int *) encodings.types) < encodings.size;
type = next_type (type)) {
if (type.meta == ty_union) {
if (type.t.strct.tag == "tag @param") {
if (type.strct.tag == "tag @param") {
found_param = 1;
}
if (type.t.strct.tag == "tag @zero") {
if (type.strct.tag == "tag @zero") {
found_zero = 1;
}
}