summaryrefslogtreecommitdiff
path: root/gcc/go/go-backend.c
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/go-backend.c
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/go-backend.c')
-rw-r--r--gcc/go/go-backend.c9
1 files changed, 9 insertions, 0 deletions
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