mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-04 06:30:10 +08:00
Don't emit unreferenced static inlines
there's no need to emit unreferenced static function, even if they are forced.
This commit is contained in:
parent
3980e4a5b9
commit
c3f0937012
6
tccgen.c
6
tccgen.c
@ -7422,9 +7422,9 @@ static void gen_inline_functions(TCCState *s)
|
||||
for (i = 0; i < s->nb_inline_fns; ++i) {
|
||||
fn = s->inline_fns[i];
|
||||
sym = fn->sym;
|
||||
if (sym && (sym->c || !(sym->type.t & VT_INLINE) )){
|
||||
/* the function was used or forced: generate its code and
|
||||
convert it to a normal function */
|
||||
if (sym && (sym->c || !(sym->type.t & (VT_INLINE | VT_STATIC)) )) {
|
||||
/* the function was used or forced (and then not internal):
|
||||
generate its code and convert it to a normal function */
|
||||
fn->sym = NULL;
|
||||
if (file)
|
||||
pstrcpy(file->filename, sizeof file->filename, fn->filename);
|
||||
|
Loading…
Reference in New Issue
Block a user