/* context.c - Holder for global state
- Copyright (C) 2013 Free Software Foundation, Inc.
+ Copyright (C) 2013-2020 Free Software Foundation, Inc.
This file is part of GCC.
#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "ggc.h"
#include "context.h"
#include "pass_manager.h"
+#include "dumpfile.h"
+#include "realmpfr.h"
/* The singleton holder of global state: */
gcc::context *g;
gcc::context::context ()
+ : m_passes (NULL), m_dumps (new gcc::dump_manager ())
{
- passes_ = new gcc::pass_manager (this);
+ have_offload = false;
+}
+
+gcc::context::~context ()
+{
+ delete m_passes;
+ delete m_dumps;
+
+ /* Release MPFR caches to avoid Valgrind leak reports. */
+ mpfr_free_cache ();
}