aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-12-21 13:29:03 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1994-12-21 13:29:03 -0500
commitb8471b656db9a17acf5270717310d8696b8fa127 (patch)
treeca066131a4d4aaa35d89c9241e4f5bac64a4cf85 /gcc
parentb6ec8c5f7538fb75c01dc5e126bf69118e88ec91 (diff)
downloadgcc-b8471b656db9a17acf5270717310d8696b8fa127.zip
gcc-b8471b656db9a17acf5270717310d8696b8fa127.tar.gz
gcc-b8471b656db9a17acf5270717310d8696b8fa127.tar.bz2
(rest_of_compilation): Adjust tests for when to inline and when to
defer. From-SVN: r8680
Diffstat (limited to 'gcc')
-rw-r--r--gcc/toplev.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 62c34f0..de32442 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -2778,14 +2778,13 @@ rest_of_compilation (decl)
compile it by itself, defer decision till end of compilation.
finish_compilation will call rest_of_compilation again
for those functions that need to be output. Also defer those
- functions that were marked inline but weren't inlined; they
- may never be used. */
-
- if ((specd || DECL_INLINE (decl))
- && ((! TREE_PUBLIC (decl) && ! TREE_ADDRESSABLE (decl)
- && ! flag_keep_inline_functions)
- || DECL_DEFER_OUTPUT (decl)
- || DECL_EXTERNAL (decl)))
+ functions that we are supposed to defer. */
+
+ if (DECL_DEFER_OUTPUT (decl)
+ || (DECL_INLINE (decl)
+ && ((! TREE_PUBLIC (decl) && ! TREE_ADDRESSABLE (decl)
+ && ! flag_keep_inline_functions)
+ || DECL_EXTERNAL (decl))))
{
#ifdef DWARF_DEBUGGING_INFO
/* Generate the DWARF info for the "abstract" instance
@@ -2822,10 +2821,12 @@ rest_of_compilation (decl)
saved_arguments = DECL_ARGUMENTS (decl);
TIMEVAR (integration_time, save_for_inline_copying (decl));
}
- }
- if (DECL_DEFER_OUTPUT (decl))
- goto exit_rest_of_compilation;
+ /* If specified extern inline but we aren't inlining it, we are
+ done. */
+ if (specd && DECL_EXTERNAL (decl))
+ goto exit_rest_of_compilation;
+ }
TREE_ASM_WRITTEN (decl) = 1;