Handle type-modified constants.

The fix for pointers broke constants (particularly, enums). Oops.
This commit is contained in:
Bill Currie 2011-02-13 14:13:32 +09:00
parent fa6b8d773c
commit f24de89a2a

View file

@ -72,7 +72,10 @@ get_value_def (ex_value_t *value, etype_t type)
def->offset = value->v.short_val; def->offset = value->v.short_val;
return def; return def;
} }
return emit_value (value, 0); def = emit_value (value, 0);
if (type != def->type->type)
return alias_def (def, ev_types[type]);
return def;
} }
static def_t * static def_t *