diff options
author | Than McIntosh <thanm@google.com> | 2016-10-11 00:11:43 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-10-11 00:11:43 +0000 |
commit | 3c061ac0525eebec030eee46aab6671023177eea (patch) | |
tree | 2cb8646afabaf58b7f77d2990aa7cd375f662850 /gcc/go/go-c.h | |
parent | abe08b7d909d27884e9f5f2cb879739e2c909106 (diff) | |
download | gcc-3c061ac0525eebec030eee46aab6671023177eea.zip gcc-3c061ac0525eebec030eee46aab6671023177eea.tar.gz gcc-3c061ac0525eebec030eee46aab6671023177eea.tar.bz2 |
compiler: move Backend/Linemap creation out of front end.
Push the calls to create Backend and Linemap object out
of the front end into the back end, and instead pass pointers to
these objects in the go_create_gogo_args struct. This allows
for more flexibility in the interfaces used to create the
objects.
Reviewed-on: https://go-review.googlesource.com/30698
* go-gcc.h: New file.
* go-c.h (struct go_create_gogo_args): Add backend and linemap
fields.
* go-lang.c: Include "go-gcc.h".
(go_langhook_init): Set linemap and backend fields of args.
* go-gcc.cc: Include "go-gcc.h".
* go-linemap.cc: Include "go-gcc.h".
From-SVN: r240959
Diffstat (limited to 'gcc/go/go-c.h')
-rw-r--r-- | gcc/go/go-c.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/go/go-c.h b/gcc/go/go-c.h index 194c1a9..74e8946 100644 --- a/gcc/go/go-c.h +++ b/gcc/go/go-c.h @@ -22,6 +22,8 @@ along with GCC; see the file COPYING3. If not see #define GO_EXTERN_C +class Linemap; +class Backend; /* Functions defined in the Go frontend proper called by the GCC interface. */ @@ -36,9 +38,11 @@ struct go_create_gogo_args int int_type_size; int pointer_size; const char* pkgpath; - const char *prefix; - const char *relative_import_path; - const char *c_header; + const char* prefix; + const char* relative_import_path; + const char* c_header; + Backend* backend; + Linemap* linemap; bool check_divide_by_zero; bool check_divide_overflow; bool compiling_runtime; |