]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2015-08-28 Richard Biener <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Aug 2015 07:47:37 +0000 (07:47 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 28 Aug 2015 07:47:37 +0000 (07:47 +0000)
* cgraphunit.c (symbol_table::compile): Move early debug generation
and finish...
(symbol_table::finalize_compilation_unit): ... back here and
add a !seen_error () guard.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227293 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cgraphunit.c

index d77e4425cd325e7eab44fe30589f7e19c68e3446..8a40fd286a5e09581137ffd8828c71e8bfd09f63 100644 (file)
@@ -1,3 +1,10 @@
+2015-08-28  Richard Biener  <rguenther@suse.de>
+
+       * cgraphunit.c (symbol_table::compile): Move early debug generation
+       and finish...
+       (symbol_table::finalize_compilation_unit): ... back here and
+       add a !seen_error () guard.
+
 2015-08-27  Sebastian Pop  <s.pop@samsung.com>
 
        * toplev.c (process_options): Do not use flag_loop_block,
index cdec63bc60a6928dd0485fdbb44b140f5a741a82..be16f5d0d0455db094dff15095e58b5b02ed4c88 100644 (file)
@@ -2314,16 +2314,6 @@ symbol_table::compile (void)
   symtab_node::verify_symtab_nodes ();
 #endif
 
-  /* Emit early debug for reachable functions, and by consequence,
-     locally scoped symbols.  */
-  struct cgraph_node *cnode;
-  FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (cnode)
-    (*debug_hooks->early_global_decl) (cnode->decl);
-
-  /* Clean up anything that needs cleaning up after initial debug
-     generation.  */
-  (*debug_hooks->early_finish) ();
-
   timevar_push (TV_CGRAPHOPT);
   if (pre_ipa_mem_report)
     {
@@ -2492,6 +2482,19 @@ symbol_table::finalize_compilation_unit (void)
   /* Gimplify and lower thunks.  */
   analyze_functions (/*first_time=*/false);
 
+  if (!seen_error ())
+    {
+      /* Emit early debug for reachable functions, and by consequence,
+        locally scoped symbols.  */
+      struct cgraph_node *cnode;
+      FOR_EACH_FUNCTION_WITH_GIMPLE_BODY (cnode)
+       (*debug_hooks->early_global_decl) (cnode->decl);
+
+      /* Clean up anything that needs cleaning up after initial debug
+        generation.  */
+      (*debug_hooks->early_finish) ();
+    }
+
   /* Finally drive the pass manager.  */
   compile ();