diff options
author | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-25 00:14:01 +0000 |
---|---|---|
committer | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-25 00:14:01 +0000 |
commit | 8d0badf15d01d37f25956793782c6868801f8317 (patch) | |
tree | 59690893637ad56224c275c8da65c63a006aec0b /gcc/toplev.c | |
parent | 36fa8dd01587685c01f490369ed31b03268545ca (diff) | |
download | gcc-8d0badf15d01d37f25956793782c6868801f8317.tar.gz |
2013-07-24 David Malcolm <dmalcolm@redhat.com>
Introduce context class.
* Makefile.in (CONTEXT_H): New.
(OBJS): Add context.o.
(toplev.o): Add CONTEXT_H to dependencies.
(context.o): New.
* toplev.c (general_init): Create the singleton gcc::context
instance.
* context.c: New.
* context.h: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201230 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index a2ee4913090..de28a2d4df1 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -75,6 +75,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-alias.h" #include "plugin.h" #include "diagnostic-color.h" +#include "context.h" #if defined(DBX_DEBUGGING_INFO) || defined(XCOFF_DEBUGGING_INFO) #include "dbxout.h" @@ -1156,6 +1157,10 @@ general_init (const char *argv0) /* This must be done after global_init_params but before argument processing. */ init_ggc_heuristics(); + + /* Create the singleton holder for global state. */ + g = new gcc::context(); + init_optimization_passes (); statistics_early_init (); finish_params (); |