/* 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.
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "toplev.h" /* for print_version */
#include "jit-logging.h"
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
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;
}