summaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-01 01:20:07 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-01 01:20:07 +0000
commit56368084224568194c00ea052cd950a69b4e2c56 (patch)
treecd908f9cd1393f4a7fb4b58a7c6ee00f5c5aeffc /gcc/go
parent67d3a83651fa65d9a0ac12fd9ae5e0e1b4c4154f (diff)
downloadgcc-56368084224568194c00ea052cd950a69b4e2c56.tar.gz
* go-backend.c: #include "diagnostics.h".
(saw_errors): New function. * go-c.h (saw_errors): Declare. * Make-lang.in (GO_OBJS): Remove go/gogo-tree.o. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209968 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/ChangeLog7
-rw-r--r--gcc/go/Make-lang.in1
-rw-r--r--gcc/go/go-backend.c9
-rw-r--r--gcc/go/go-c.h2
-rw-r--r--gcc/go/gofrontend/gogo-tree.cc37
5 files changed, 18 insertions, 38 deletions
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog
index 2bb10ed9b1c..a468beed742 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,5 +1,12 @@
2014-04-30 Chris Manghane <cmang@google.com>
+ * go-backend.c: #include "diagnostics.h".
+ (saw_errors): New function.
+ * go-c.h (saw_errors): Declare.
+ * Make-lang.in (GO_OBJS): Remove go/gogo-tree.o.
+
+2014-04-30 Chris Manghane <cmang@google.com>
+
* go-lang.c (go_langhook_type_for_size): Do it here, rather than
calling into Go frontend.
(go_langhook_type_for_mode): Likewise.
diff --git a/gcc/go/Make-lang.in b/gcc/go/Make-lang.in
index abcae66a21f..bbd26dc2110 100644
--- a/gcc/go/Make-lang.in
+++ b/gcc/go/Make-lang.in
@@ -60,7 +60,6 @@ GO_OBJS = \
go/go-linemap.o \
go/go-optimize.o \
go/go.o \
- go/gogo-tree.o \
go/gogo.o \
go/import.o \
go/import-archive.o \
diff --git a/gcc/go/go-backend.c b/gcc/go/go-backend.c
index de33601db52..3f1a9f93b71 100644
--- a/gcc/go/go-backend.c
+++ b/gcc/go/go-backend.c
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "output.h" /* for assemble_string */
#include "target.h"
#include "common/common-target.h"
+#include "diagnostic.h"
#include "go-c.h"
@@ -48,6 +49,14 @@ along with GCC; see the file COPYING3. If not see
/* This file holds all the cases where the Go frontend needs
information from gcc's backend. */
+/* Return whether or not GCC has reported any errors. */
+
+bool
+saw_errors (void)
+{
+ return errorcount != 0 || sorrycount != 0;
+}
+
/* Return the alignment in bytes of a struct field of type T. */
unsigned int
diff --git a/gcc/go/go-c.h b/gcc/go/go-c.h
index d5cf48f04e6..cb10f2b7be7 100644
--- a/gcc/go/go-c.h
+++ b/gcc/go/go-c.h
@@ -46,6 +46,8 @@ extern void go_write_globals (void);
extern void go_preserve_from_gc (tree);
+extern bool saw_errors (void);
+
extern const char *go_localize_identifier (const char*);
extern unsigned int go_field_alignment (tree);
diff --git a/gcc/go/gofrontend/gogo-tree.cc b/gcc/go/gofrontend/gogo-tree.cc
deleted file mode 100644
index 9a6ffa6a040..00000000000
--- a/gcc/go/gofrontend/gogo-tree.cc
+++ /dev/null
@@ -1,37 +0,0 @@
-// gogo-tree.cc -- convert Go frontend Gogo IR to gcc trees.
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-#include "go-system.h"
-
-#include "toplev.h"
-#include "tree.h"
-#include "stringpool.h"
-#include "stor-layout.h"
-#include "varasm.h"
-#include "gimple-expr.h"
-#include "gimplify.h"
-#include "tree-iterator.h"
-#include "cgraph.h"
-#include "langhooks.h"
-#include "convert.h"
-#include "output.h"
-#include "diagnostic.h"
-#include "go-c.h"
-
-#include "types.h"
-#include "expressions.h"
-#include "statements.h"
-#include "runtime.h"
-#include "backend.h"
-#include "gogo.h"
-
-// Whether we have seen any errors.
-
-bool
-saw_errors()
-{
- return errorcount != 0 || sorrycount != 0;
-}