Commit 07af9d16 by Jason Merrill

(compile_file): Unset DECL_DEFER_OUTPUT on decls considered at end of file.

(compile_file): Unset DECL_DEFER_OUTPUT on decls
        considered at end of file.
(rest_of_compilation): Also postpone compilation of
        inlines with DECL_DEFER_OUTPUT set.
        (compile_file): Always emit postponed inlines if
        -fkeep-inline-functions.

From-SVN: r7507
parent 30801830
...@@ -2275,6 +2275,10 @@ compile_file (name) ...@@ -2275,6 +2275,10 @@ compile_file (name)
for (i = 0; i < len; i++) for (i = 0; i < len; i++)
{ {
decl = vec[i]; decl = vec[i];
/* We're not deferring this any longer. */
DECL_DEFER_OUTPUT (decl) = 0;
if (TREE_CODE (decl) == VAR_DECL && DECL_SIZE (decl) == 0 if (TREE_CODE (decl) == VAR_DECL && DECL_SIZE (decl) == 0
&& incomplete_decl_finalize_hook != 0) && incomplete_decl_finalize_hook != 0)
(*incomplete_decl_finalize_hook) (decl); (*incomplete_decl_finalize_hook) (decl);
...@@ -2323,6 +2327,7 @@ compile_file (name) ...@@ -2323,6 +2327,7 @@ compile_file (name)
&& ! TREE_ASM_WRITTEN (decl) && ! TREE_ASM_WRITTEN (decl)
&& DECL_INITIAL (decl) != 0 && DECL_INITIAL (decl) != 0
&& (TREE_ADDRESSABLE (decl) && (TREE_ADDRESSABLE (decl)
|| flag_keep_inline_functions
|| TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (decl))) || TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (decl)))
&& ! DECL_EXTERNAL (decl)) && ! DECL_EXTERNAL (decl))
{ {
...@@ -2710,6 +2715,7 @@ rest_of_compilation (decl) ...@@ -2710,6 +2715,7 @@ rest_of_compilation (decl)
if ((specd || DECL_INLINE (decl)) if ((specd || DECL_INLINE (decl))
&& ((! TREE_PUBLIC (decl) && ! TREE_ADDRESSABLE (decl) && ((! TREE_PUBLIC (decl) && ! TREE_ADDRESSABLE (decl)
&& ! flag_keep_inline_functions) && ! flag_keep_inline_functions)
|| DECL_DEFER_OUTPUT (decl)
|| DECL_EXTERNAL (decl))) || DECL_EXTERNAL (decl)))
{ {
#ifdef DWARF_DEBUGGING_INFO #ifdef DWARF_DEBUGGING_INFO
...@@ -2749,6 +2755,9 @@ rest_of_compilation (decl) ...@@ -2749,6 +2755,9 @@ rest_of_compilation (decl)
} }
} }
if (DECL_DEFER_OUTPUT (decl))
goto exit_rest_of_compilation;
TREE_ASM_WRITTEN (decl) = 1; TREE_ASM_WRITTEN (decl) = 1;
/* Now that integrate will no longer see our rtl, we need not distinguish /* Now that integrate will no longer see our rtl, we need not distinguish
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment