aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/ChangeLog9
-rw-r--r--gcc/go/go-gcc.cc8
-rw-r--r--gcc/go/go-lang.c13
3 files changed, 14 insertions, 16 deletions
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog
index da13f94..f996de2 100644
--- a/gcc/go/ChangeLog
+++ b/gcc/go/ChangeLog
@@ -1,3 +1,12 @@
+2015-06-05 Aldy Hernandez <aldyh@redhat.com>
+
+ * go-gcc.cc (write_global_definitions): Remove call to
+ finalize_compilation_unit.
+ Remove Go specific debug generation.
+ * go-lang.c (go_langhook_parse_file): Call go_write_globals.
+ (go_langhook_write_globals): Remove.
+ Remove LANG_HOOKS_WRITE_GLOBALS everywhere.
+
2015-06-04 Andrew MacLeod <amacleod@redhat.com>
* go-backend.c: Adjust includes for restructured coretypes.h.
diff --git a/gcc/go/go-gcc.cc b/gcc/go/go-gcc.cc
index 77e1a2e..65f4181 100644
--- a/gcc/go/go-gcc.cc
+++ b/gcc/go/go-gcc.cc
@@ -3020,7 +3020,8 @@ Gcc_backend::lookup_builtin(const std::string& name)
}
// Write the definitions for all TYPE_DECLS, CONSTANT_DECLS,
-// FUNCTION_DECLS, and VARIABLE_DECLS declared globally.
+// FUNCTION_DECLS, and VARIABLE_DECLS declared globally, as well as
+// emit early debugging information.
void
Gcc_backend::write_global_definitions(
@@ -3093,11 +3094,6 @@ Gcc_backend::write_global_definitions(
wrapup_global_declarations(defs, i);
- symtab->finalize_compilation_unit();
-
- check_global_declarations(defs, i);
- emit_debug_global_declarations(defs, i);
-
delete[] defs;
}
diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c
index 5231315..28db40a 100644
--- a/gcc/go/go-lang.c
+++ b/gcc/go/go-lang.c
@@ -307,6 +307,9 @@ go_langhook_parse_file (void)
{
go_parse_input_files (in_fnames, num_in_fnames, flag_syntax_only,
go_require_return_statement);
+
+ /* Final processing of globals and early debug info generation. */
+ go_write_globals ();
}
static tree
@@ -452,14 +455,6 @@ go_langhook_getdecls (void)
return NULL;
}
-/* Write out globals. */
-
-static void
-go_langhook_write_globals (void)
-{
- go_write_globals ();
-}
-
/* Go specific gimplification. We need to gimplify
CALL_EXPR_STATIC_CHAIN, because the gimplifier doesn't handle
it. */
@@ -557,7 +552,6 @@ go_localize_identifier (const char *ident)
#undef LANG_HOOKS_GLOBAL_BINDINGS_P
#undef LANG_HOOKS_PUSHDECL
#undef LANG_HOOKS_GETDECLS
-#undef LANG_HOOKS_WRITE_GLOBALS
#undef LANG_HOOKS_GIMPLIFY_EXPR
#undef LANG_HOOKS_EH_PERSONALITY
@@ -574,7 +568,6 @@ go_localize_identifier (const char *ident)
#define LANG_HOOKS_GLOBAL_BINDINGS_P go_langhook_global_bindings_p
#define LANG_HOOKS_PUSHDECL go_langhook_pushdecl
#define LANG_HOOKS_GETDECLS go_langhook_getdecls
-#define LANG_HOOKS_WRITE_GLOBALS go_langhook_write_globals
#define LANG_HOOKS_GIMPLIFY_EXPR go_langhook_gimplify_expr
#define LANG_HOOKS_EH_PERSONALITY go_langhook_eh_personality