Fix build of jit after debug-early merger
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 5 Jun 2015 20:23:19 +0000 (20:23 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Fri, 5 Jun 2015 20:23:19 +0000 (20:23 +0000)
gcc/jit/ChangeLog:
* dummy-frontend.c (jit_langhook_write_globals): Rename to...
(jit_langhook_post_compilation_parsing_cleanups): ...this, and
eliminate calls to finalize_compilation_unit and
write_global_decls_2.
(LANG_HOOKS_WRITE_GLOBALS): Rename to...
(LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and
redirect from jit_langhook_write_globals to
jit_langhook_post_compilation_parsing_cleanups.
* jit-playback.c
(gcc::jit::playback::context::write_global_decls_1): Rename to...
(gcc::jit::playback::context::finalize_global_decls): ...this.
(gcc::jit::playback::context::write_global_decls_1): Delete.
* jit-playback.h
(gcc::jit::playback::context::write_global_decls_1): Rename to...
(gcc::jit::playback::context::finalize_global_decls): ...this.
(gcc::jit::playback::context::write_global_decls_1): Delete.

From-SVN: r224170

gcc/jit/ChangeLog
gcc/jit/dummy-frontend.c
gcc/jit/jit-playback.c
gcc/jit/jit-playback.h

index 8cd7823f5a82c66e3c9eb6d2759fe5ecba3dd168..6610da969d3306b12c9ce96a0e4628519a96310d 100644 (file)
@@ -1,3 +1,22 @@
+2015-06-05  David Malcolm  <dmalcolm@redhat.com>
+
+       * dummy-frontend.c (jit_langhook_write_globals): Rename to...
+       (jit_langhook_post_compilation_parsing_cleanups): ...this, and
+       eliminate calls to finalize_compilation_unit and
+       write_global_decls_2.
+       (LANG_HOOKS_WRITE_GLOBALS): Rename to...
+       (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): ...this and
+       redirect from jit_langhook_write_globals to
+       jit_langhook_post_compilation_parsing_cleanups.
+       * jit-playback.c
+       (gcc::jit::playback::context::write_global_decls_1): Rename to...
+       (gcc::jit::playback::context::finalize_global_decls): ...this.
+       (gcc::jit::playback::context::write_global_decls_1): Delete.
+       * jit-playback.h
+       (gcc::jit::playback::context::write_global_decls_1): Rename to...
+       (gcc::jit::playback::context::finalize_global_decls): ...this.
+       (gcc::jit::playback::context::write_global_decls_1): Delete.
+
 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
 
        * dummy-frontend.c: Adjust includes for restructured coretypes.h.
index 38aa18268baa8424c6e92ddaf7a0cfe007fdc4ae..4a7966ddd6e68eab997a13b91bb0aa7c3dcfd462 100644 (file)
@@ -219,18 +219,13 @@ jit_langhook_getdecls (void)
 }
 
 static void
-jit_langhook_write_globals (void)
+jit_langhook_post_compilation_parsing_cleanups (void)
 {
   gcc::jit::playback::context *ctxt = gcc::jit::active_playback_ctxt;
   gcc_assert (ctxt);
   JIT_LOG_SCOPE (ctxt->get_logger ());
 
-  ctxt->write_global_decls_1 ();
-
-  /* This is the hook that runs the middle and backends: */
-  symtab->finalize_compilation_unit ();
-
-  ctxt->write_global_decls_2 ();
+  ctxt->finalize_global_decls ();
 }
 
 #undef LANG_HOOKS_NAME
@@ -260,8 +255,9 @@ jit_langhook_write_globals (void)
 #undef LANG_HOOKS_GETDECLS
 #define LANG_HOOKS_GETDECLS            jit_langhook_getdecls
 
-#undef LANG_HOOKS_WRITE_GLOBALS
-#define LANG_HOOKS_WRITE_GLOBALS       jit_langhook_write_globals
+#undef LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS
+#define LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS \
+  jit_langhook_post_compilation_parsing_cleanups
 
 struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
 
index 0a812877d8691d649f513c95c286419b520ee506..64478b7e5eabb59e472b38a67089513011ec3d06 100644 (file)
@@ -668,14 +668,13 @@ as_truth_value (tree expr, location *loc)
   return expr;
 }
 
-/* For use by jit_langhook_write_globals.
+/* For use by jit_langhook_post_compilation_parsing_cleanups
    Calls varpool_node::finalize_decl on each global.  */
 
 void
 playback::context::
-write_global_decls_1 ()
+finalize_global_decls ()
 {
-  /* Compare with e.g. the C frontend's c_write_global_declarations.  */
   JIT_LOG_SCOPE (get_logger ());
 
   int i;
@@ -687,26 +686,6 @@ write_global_decls_1 ()
     }
 }
 
-/* For use by jit_langhook_write_globals.
-   Calls debug_hooks->global_decl on each global.  */
-
-void
-playback::context::
-write_global_decls_2 ()
-{
-  /* Compare with e.g. the C frontend's c_write_global_declarations_2. */
-  JIT_LOG_SCOPE (get_logger ());
-
-  int i;
-  tree decl;
-  FOR_EACH_VEC_ELT (m_globals, i, decl)
-    {
-      gcc_assert (TREE_CODE (decl) == VAR_DECL);
-      debug_hooks->global_decl (decl);
-    }
-}
-
-
 /* Construct a playback::rvalue instance (wrapping a tree) for a
    unary op.  */
 
index e9832f0378ebb6c60e3bb11e9586f79a16c43180..84d99e4f38eb059f50e078876caeb49e0da52814 100644 (file)
@@ -215,9 +215,7 @@ public:
     return m_recording_ctxt->errors_occurred ();
   }
 
-  /* For use by jit_langhook_write_globals.  */
-  void write_global_decls_1 ();
-  void write_global_decls_2 ();
+  void finalize_global_decls ();
 
 private:
   void dump_generated_code ();