toplev.c (compile_file): Move call to output_func_start_profiler to after the loop...
authorJeffrey A Law <law@cygnus.com>
Fri, 8 Jan 1999 00:46:25 +0000 (00:46 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 8 Jan 1999 00:46:25 +0000 (17:46 -0700)
        * toplev.c (compile_file): Move call to output_func_start_profiler
        to after the loop to emit deferred functions.

From-SVN: r24567

gcc/ChangeLog
gcc/toplev.c

index a71ab6e5595bf98789209a609e012e0d4d74ebb0..9aaf201fdd30e272e2c740b26ce5a436688465ad 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jan  8 01:43:53 1999  Jeffrey A Law  (law@cygnus.com)
+
+       * toplev.c (compile_file): Move call to output_func_start_profiler
+       to after the loop to emit deferred functions.
+
 Thu Jan  7 11:26:17 1999  Mark Mitchell  <mark@markmitchell.com>
 
        * calls.c (store_unaligned_arguments_into_pseudos): Use xmalloc to
index 5608af6e43e533f4884eebcac617dcc36993d9ff..bef0033c10edfdb419b386cf98433fdd7b066afc 100644 (file)
@@ -2907,8 +2907,6 @@ compile_file (name)
        poplevel (0, 0, 0);
     }
 
-  output_func_start_profiler ();
-
   /* Compilation is now finished except for writing
      what's left of the symbol table output.  */
 
@@ -3014,6 +3012,15 @@ compile_file (name)
          }
       }
 
+    /* This must occur after the loop to output deferred functions.  Else
+       the profiler initializer would not be emitted if all the functions
+       in this compilation unit were deferred.
+
+       output_func_start_profiler can not cause any additional functions or
+       data to need to be output, so it need not be in the deferred function
+       loop above.  */
+    output_func_start_profiler ();
+
     /* Now that all possible functions have been output, we can dump
        the exception table.  */