mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
Be more informative with ext/def internal errors.
This commit is contained in:
parent
6312ccba81
commit
8dbf8a97ea
1 changed files with 12 additions and 4 deletions
|
@ -245,10 +245,18 @@ linker_add_string (const char *str)
|
|||
static void
|
||||
resolve_external_def (defref_t *ext, defref_t *def)
|
||||
{
|
||||
if (!(REF (ext)->flags & QFOD_EXTERNAL))
|
||||
internal_error (0, "ext is not an external def");
|
||||
if (!(REF (def)->flags & QFOD_GLOBAL))
|
||||
internal_error (0, "def is not a global def");
|
||||
if (!(REF (ext)->flags & QFOD_EXTERNAL)) {
|
||||
def_error (REF (ext), "%s %x", WORKSTR (REF (ext)->name),
|
||||
REF (ext)->flags);
|
||||
linker_error ("ext is not an external def");
|
||||
abort ();
|
||||
}
|
||||
if (!(REF (def)->flags & QFOD_GLOBAL)) {
|
||||
def_error (REF (ext), "%s %x", WORKSTR (REF (ext)->name),
|
||||
REF (ext)->flags);
|
||||
linker_error ("def is not a global def");
|
||||
abort ();
|
||||
}
|
||||
if (REF (ext)->type != REF (def)->type) {
|
||||
linker_type_mismatch (REF (ext), REF (def));
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue