PR c++/68795: fix uninitialized close_paren_loc in cp_parser_postfix_expression
[gcc.git] / gcc / context.c
index 76e0dde9c0fabcad06499ed7c745ec7040b67be5..dac9bf7723fb666c5306481a4782ec74731805ae 100644 (file)
@@ -1,5 +1,5 @@
 /* context.c - Holder for global state
-   Copyright (C) 2013 Free Software Foundation, Inc.
+   Copyright (C) 2013-2016 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -20,8 +20,26 @@ along with GCC; see the file COPYING3.  If not see
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "ggc.h"
 #include "context.h"
+#include "pass_manager.h"
+#include "dumpfile.h"
 
 /* The singleton holder of global state: */
 gcc::context *g;
+
+gcc::context::context ()
+{
+  have_offload = false;
+
+  /* The pass manager's constructor uses the dump manager (to set up
+     dumps for the various passes), so the dump manager must be set up
+     before the pass manager.  */
+  m_dumps = new gcc::dump_manager ();
+  m_passes = new gcc::pass_manager (this);
+}
+
+gcc::context::~context ()
+{
+  delete m_passes;
+  delete m_dumps;
+}