History

Don't emit unreferenced static inlines

there's no need to emit unreferenced static function, even if they are forced.

Michael Matz committed 7 years ago

Commit c3f09371 parent 3980e4a1 file · +3 −3Browse files

Unified · Split

tccgen.c+3−3
@@ -7422,9 +7422,9 @@ static void gen_inline_functions(TCCState *s) · 7421 unmodified lines
74227422 for (i = 0; i < s->nb_inline_fns; ++i) {
74237423 fn = s->inline_fns[i];
74247424 sym = fn->sym;
7425− if (sym && (sym->c || !(sym->type.t & VT_INLINE) )){
7426− /* the function was used or forced: generate its code and
7427− convert it to a normal function */
7425+ if (sym && (sym->c || !(sym->type.t & (VT_INLINE | VT_STATIC)) )) {
7426+ /* the function was used or forced (and then not internal):
7427+ generate its code and convert it to a normal function */
74287428 fn->sym = NULL;
74297429 if (file)
74307430 pstrcpy(file->filename, sizeof file->filename, fn->filename);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t