]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/jit/jit-logging.c
Update copyright years.
[thirdparty/gcc.git] / gcc / jit / jit-logging.c
index 61b898b00bd1af379efe2beb6b9a4eca25e9241f..bd50c4d3fc2581b308dfcff93dfe7f9743b1a8a2 100644 (file)
@@ -1,5 +1,5 @@
 /* Internals of libgccjit: logging
-   Copyright (C) 2014-2015 Free Software Foundation, Inc.
+   Copyright (C) 2014-2022 Free Software Foundation, Inc.
    Contributed by David Malcolm <dmalcolm@redhat.com>.
 
 This file is part of GCC.
@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
+#include "toplev.h" /* for print_version */
 
 #include "jit-logging.h"
 
@@ -41,6 +42,8 @@ logger::logger (FILE *f_out,
   m_indent_level (0),
   m_log_refcount_changes (false)
 {
+  /* Begin the log by writing the GCC version.  */
+  print_version (f_out, "JIT:", false);
 }
 
 /* The destructor for gcc::jit::logger, invoked via
@@ -76,7 +79,7 @@ logger::decref (const char *reason)
   if (m_log_refcount_changes)
     log ("%s: reason: %s refcount now %i",
         __PRETTY_FUNCTION__, reason, m_refcount);
-  if (0 == m_refcount)
+  if (m_refcount == 0)
     delete this;
 }