]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/jit/dummy-frontend.c
New jit API entrypoint: gcc_jit_context_set_logfile
[thirdparty/gcc.git] / gcc / jit / dummy-frontend.c
index 9bea2c163185173f724c97a6f86c0eab37b036f5..23883ad230c7fe8b8e6eed30e3f2cc4f2e12bcde 100644 (file)
@@ -43,6 +43,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "cgraph.h"
 
 #include "jit-common.h"
+#include "jit-logging.h"
 #include "jit-playback.h"
 
 #include <mpfr.h>
@@ -113,6 +114,9 @@ struct ggc_root_tab jit_root_tab[] =
 static bool
 jit_langhook_init (void)
 {
+  gcc_assert (gcc::jit::active_playback_ctxt);
+  JIT_LOG_SCOPE (gcc::jit::active_playback_ctxt->get_logger ());
+
   static bool registered_root_tab = false;
   if (!registered_root_tab)
     {
@@ -212,6 +216,9 @@ jit_langhook_getdecls (void)
 static void
 jit_langhook_write_globals (void)
 {
+  gcc_assert (gcc::jit::active_playback_ctxt);
+  JIT_LOG_SCOPE (gcc::jit::active_playback_ctxt->get_logger ());
+
   /* This is the hook that runs the middle and backends: */
   symtab->finalize_compilation_unit ();
 }