diff options
author | Chris Manghane <cmang@google.com> | 2014-05-01 01:20:07 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2014-05-01 01:20:07 +0000 |
commit | d2d9bc36ee79f7c823d1f1eb181f8eb77d8ba08b (patch) | |
tree | cd908f9cd1393f4a7fb4b58a7c6ee00f5c5aeffc /gcc/go/go-backend.c | |
parent | 6c76a95d1b26ca4639b70aece82a6e6b50499536 (diff) | |
download | gcc-d2d9bc36ee79f7c823d1f1eb181f8eb77d8ba08b.zip gcc-d2d9bc36ee79f7c823d1f1eb181f8eb77d8ba08b.tar.gz gcc-d2d9bc36ee79f7c823d1f1eb181f8eb77d8ba08b.tar.bz2 |
go-backend.c: #include "diagnostics.h".
* 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.
From-SVN: r209968
Diffstat (limited to 'gcc/go/go-backend.c')
-rw-r--r-- | gcc/go/go-backend.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/go/go-backend.c b/gcc/go/go-backend.c index de33601..3f1a9f9 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 |