From c3f0937012d328fef7d2f68903404806d1f45244 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 17 Jun 2019 19:28:51 +0200 Subject: [PATCH] Don't emit unreferenced static inlines there's no need to emit unreferenced static function, even if they are forced. --- tccgen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tccgen.c b/tccgen.c index ca2a9a53..952df53e 100644 --- a/tccgen.c +++ b/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);