From aeb66e2405094c4e004ea786935b9408015b46bc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 21 May 2010 11:23:50 +0200 Subject: Use forward declarations of GCC AST where possible --- odb/gcc-fwd.hxx | 14 ++++++++++++++ odb/gcc.hxx | 34 ++++++++++++++++++---------------- odb/semantics/elements.hxx | 4 ++-- 3 files changed, 34 insertions(+), 18 deletions(-) create mode 100644 odb/gcc-fwd.hxx diff --git a/odb/gcc-fwd.hxx b/odb/gcc-fwd.hxx new file mode 100644 index 0000000..bf54536 --- /dev/null +++ b/odb/gcc-fwd.hxx @@ -0,0 +1,14 @@ +// file : odb/gcc-fwd.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC +// license : GNU GPL v2; see accompanying LICENSE file + +#ifndef ODB_GCC_FWD_HXX +#define ODB_GCC_FWD_HXX + +extern "C" +{ +#include +} + +#endif // ODB_GCC_FWD_HXX diff --git a/odb/gcc.hxx b/odb/gcc.hxx index 9d1e3bc..feca3ee 100644 --- a/odb/gcc.hxx +++ b/odb/gcc.hxx @@ -3,11 +3,13 @@ // copyright : Copyright (c) 2009-2010 Code Synthesis Tools CC // license : GNU GPL v2; see accompanying LICENSE file -#ifndef ODB_GCC_TREE_HXX -#define ODB_GCC_TREE_HXX +#ifndef ODB_GCC_HXX +#define ODB_GCC_HXX -// GCC header includes to get the parse tree declarations. The order -// is important and doesn't follow any kind of logic. +#include + +// GCC header includes to get the plugin and parse tree declarations. +// The order is important and doesn't follow any kind of logic. // #include @@ -17,20 +19,20 @@ extern "C" { -#include "gcc-plugin.h" +#include -#include "config.h" -#include "system.h" -#include "coretypes.h" -#include "tree.h" -#include "intl.h" +#include +#include +#include +#include +#include -#include "tm.h" +#include -#include "diagnostic.h" -#include "c-common.h" -#include "c-pragma.h" -#include "cp/cp-tree.h" +#include +#include +#include +#include } #ifndef LOCATION_COLUMN @@ -41,4 +43,4 @@ extern "C" #define DECL_SOURCE_COLUMN(NODE) LOCATION_COLUMN (DECL_SOURCE_LOCATION (NODE)) #endif -#endif // ODB_GCC_TREE_HXX +#endif // ODB_GCC_HXX diff --git a/odb/semantics/elements.hxx b/odb/semantics/elements.hxx index cc3b0be..3c98db8 100644 --- a/odb/semantics/elements.hxx +++ b/odb/semantics/elements.hxx @@ -6,8 +6,6 @@ #ifndef ODB_SEMANTICS_ELEMENTS_HXX #define ODB_SEMANTICS_ELEMENTS_HXX -#include // Keep it first. - #include #include #include @@ -22,6 +20,8 @@ #include #include +#include + namespace semantics { using namespace cutl; -- cgit v1.1