diff mbox

[debug-early] C++: moving more things before the compilation proper

Message ID 54933171.9010304@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez Dec. 18, 2014, 7:56 p.m. UTC
Hi Jason.

As promised, I am moving most everything out of 
cxx_post_compilation_parsing_cleanups() which is the hook that will be 
called after the compilation proper has run 
(symtab->finalize_compilation_unit()).

Apart from the Java hidden alias support which I just asked you about, 
and the VTV stuff which will remain in the aforementioned hook, the only 
remaining bits are:

   input_location = locus_at_end_of_parsing;

#ifdef ENABLE_CHECKING
   validate_conversion_obstack ();
#endif /* ENABLE_CHECKING */

I am keeping the input_location bit because the final VTV stuff has some 
error() calls which presumably will need a location.

And I am keeping validate_conversion_obstack() because I *think* the VTV 
stuff will create calls?  If not, let me know and I can move this bit too.

In any case, things are pretty deserted in 
cxx_post_compilation_parsing_cleanups(), which should make everybody 
happy :-).

I am committing the following to the branch.  Let me know if you have 
any suggestions.

Thanks.
Aldy
commit 0cf41add70fad5defc4ff07b76f95e3aaadc1b05
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Thu Dec 18 11:47:19 2014 -0800

    	* cp/decl2.c (cxx_post_compilation_parsing_cleanups): Move some
    	final checks...
    	(c_parse_final_cleanups): ...here.
diff mbox

Patch

diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index f9d1028..6441ab2 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -4723,6 +4723,21 @@  c_parse_final_cleanups (void)
 				      pending_statics->length (),
 				      EMIT_DEBUG_EARLY);
     }
+
+  perform_deferred_noexcept_checks ();
+
+  finish_repo ();
+
+  /* The entire file is now complete.  If requested, dump everything
+     to a file.  */
+  dump_tu ();
+
+  if (flag_detailed_statistics)
+    {
+      dump_tree_statistics ();
+      dump_time_statistics ();
+    }
+
   timevar_stop (TV_PHASE_DBGINFO);
   timevar_start (TV_PHASE_PARSING);
 }
@@ -4746,8 +4761,6 @@  cxx_post_compilation_parsing_cleanups (void)
       vtv_generate_init_routine ();
     }
 
-  perform_deferred_noexcept_checks ();
-
   /* Generate hidden aliases for Java.  */
   if (java_hidden_aliases)
     {
@@ -4755,17 +4768,6 @@  cxx_post_compilation_parsing_cleanups (void)
       delete java_hidden_aliases;
     }
 
-  finish_repo ();
-
-  /* The entire file is now complete.  If requested, dump everything
-     to a file.  */
-  dump_tu ();
-
-  if (flag_detailed_statistics)
-    {
-      dump_tree_statistics ();
-      dump_time_statistics ();
-    }
   input_location = locus_at_end_of_parsing;
 
 #ifdef ENABLE_CHECKING