mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[qfcc] Unalias def types before checking
This fixes the typelinker test, but not the linking error in ruamoko/game that it was supposed to represent. I guess there's something more going on (maybe type encoding relocation issues).
This commit is contained in:
parent
8ba3ab89d5
commit
6f871a8af9
1 changed files with 11 additions and 1 deletions
|
@ -282,6 +282,8 @@ alloc_data (int space, int size)
|
|||
static void
|
||||
resolve_external_def (defref_t *ext, defref_t *def)
|
||||
{
|
||||
qfot_type_t *ext_type;
|
||||
qfot_type_t *def_type;
|
||||
if (!(REF (ext)->flags & QFOD_EXTERNAL)) {
|
||||
def_error (REF (ext), "%s %x", WORKSTR (REF (ext)->name),
|
||||
REF (ext)->flags);
|
||||
|
@ -292,7 +294,15 @@ resolve_external_def (defref_t *ext, defref_t *def)
|
|||
REF (def)->flags);
|
||||
linker_internal_error ("def is an external or local def");
|
||||
}
|
||||
if (REF (ext)->type != REF (def)->type) {
|
||||
ext_type = WORKTYPE (REF(ext)->type);
|
||||
if (ext_type->meta == ty_alias) {
|
||||
ext_type = WORKTYPE (ext_type->t.alias.aux_type);
|
||||
}
|
||||
def_type = WORKTYPE (REF (def)->type);
|
||||
if (def_type->meta == ty_alias) {
|
||||
def_type = WORKTYPE (def_type->t.alias.aux_type);
|
||||
}
|
||||
if (ext_type != def_type) {
|
||||
linker_type_mismatch (REF (ext), REF (def));
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue