summaryrefslogtreecommitdiff
path: root/gcc/c-lang.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-20 11:10:16 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-20 11:10:16 +0000
commit00ec6c2c1343777de57f495f0f66fe0764b187ef (patch)
treee3095f7ff8c0628af19048bba72c2a82a742abd5 /gcc/c-lang.c
parent1093a4f3ba000c12f6dbb0cbc0f7e4b4dedf2cb6 (diff)
downloadgcc-00ec6c2c1343777de57f495f0f66fe0764b187ef.tar.gz
* c-lang.c (finish_file): Backout 2001-11-16
changes, instead set DECL_DEFER_OUTPUT for static inline functions before calling c_expand_deferred_function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47212 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-lang.c')
-rw-r--r--gcc/c-lang.c28
1 files changed, 5 insertions, 23 deletions
diff --git a/gcc/c-lang.c b/gcc/c-lang.c
index 54f86dfab12..9f0fb286a88 100644
--- a/gcc/c-lang.c
+++ b/gcc/c-lang.c
@@ -271,38 +271,20 @@ void
finish_file ()
{
unsigned int i;
- bool reconsider;
for (i = 0; i < VARRAY_ACTIVE_SIZE (deferred_fns); i++)
{
tree decl = VARRAY_TREE (deferred_fns, i);
- if (! TREE_ASM_WRITTEN (decl) && TREE_PUBLIC (decl))
+ if (! TREE_ASM_WRITTEN (decl))
{
+ /* For static inline functions, delay the decision whether to
+ emit them or not until wrapup_global_declarations. */
+ if (! TREE_PUBLIC (decl))
+ DECL_DEFER_OUTPUT (decl) = 1;
c_expand_deferred_function (decl);
- VARRAY_TREE (deferred_fns, i) = NULL;
}
}
-
- do
- {
- reconsider = false;
- for (i = 0; i < VARRAY_ACTIVE_SIZE (deferred_fns); i++)
- {
- tree decl = VARRAY_TREE (deferred_fns, i);
-
- if (decl
- && ! TREE_ASM_WRITTEN (decl)
- && (flag_keep_inline_functions
- || TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))))
- {
- c_expand_deferred_function (decl);
- VARRAY_TREE (deferred_fns, i) = NULL;
- reconsider = true;
- }
- }
- } while (reconsider);
-
VARRAY_FREE (deferred_fns);
if (static_ctors)