* 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
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.
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 \
#include "output.h" /* for assemble_string */
#include "target.h"
#include "common/common-target.h"
+#include "diagnostic.h"
#include "go-c.h"
/* 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
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);
+++ /dev/null
-// 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;
-}