diff options
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 |