[qfcc] Set function file and line when building code

I suspect this is an ancient bug that wasn't noticed due to not looking
at progs.src compiled code enough, but it makes the first statements of
the function point to the correct line instead of a forward declaration.
This commit is contained in:
Bill Currie 2022-02-06 20:14:52 +09:00
parent abe43584ff
commit 548b7fe753

View file

@ -675,6 +675,9 @@ begin_function (symbol_t *sym, const char *nicename, symtab_t *parent,
sym->s.func->def->nosave = 1;
add_function (sym->s.func);
reloc_def_func (sym->s.func, sym->s.func->def);
sym->s.func->def->file = pr.source_file;
sym->s.func->def->line = pr.source_line;
}
sym->s.func->code = pr.code->size;