* toplev.c (compile_file): Call final_write_globals
even if there have been errors.
In gcc/cp/:
* decl2.c (cp_write_global_declarations): Rename from
cp_finish_file.
* cp-lang.c (finish_file): Don't call cp_finish_file.
* cp-tree.h (cp_write_global_declarations): Rename from
cp_finish_file.
* cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
cp_write_global_declarations.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118362
138bc75d-0d04-0410-961f-
82ee72b054a4
-2006-09-07 Eric Christopher <echristo@apple.com>
+2006-10-31 Geoffrey Keating <geoffk@apple.com>
+
+ * toplev.c (compile_file): Call final_write_globals
+ even if there have been errors.
+
+2006-10-31 Eric Christopher <echristo@apple.com>
Falk Hueffner <falk@debian.org>
* doc/extend.texi (__builtin_bswap32): Document.
+2006-09-25 Geoffrey Keating <geoffk@apple.com>
+
+ * decl2.c (cp_write_global_declarations): Rename from
+ cp_finish_file.
+ * cp-lang.c (finish_file): Don't call cp_finish_file.
+ * cp-tree.h (cp_write_global_declarations): Rename from
+ cp_finish_file.
+ * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
+ cp_write_global_declarations.
+
2006-10-31 Geoffrey Keating <geoffk@apple.com>
* name-lookup.c (get_anonymous_namespace_name): New.
void
finish_file (void)
{
- cp_finish_file ();
}
#include "gtype-cp.h"
#undef LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL
#define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL cxx_warn_unused_global_decl
#undef LANG_HOOKS_WRITE_GLOBALS
-#define LANG_HOOKS_WRITE_GLOBALS lhd_do_nothing
+#define LANG_HOOKS_WRITE_GLOBALS cp_write_global_declarations
#undef LANG_HOOKS_COMDAT_GROUP
#define LANG_HOOKS_COMDAT_GROUP cxx_comdat_group
#undef LANG_HOOKS_BUILTIN_FUNCTION
tree);
extern void cplus_decl_attributes (tree *, tree, int);
extern void finish_anon_union (tree);
-extern void cp_finish_file (void);
+extern void cp_write_global_declarations (void);
extern tree coerce_new_type (tree);
extern tree coerce_delete_type (tree);
extern void comdat_linkage (tree);
}
}
-/* This routine is called from the last rule in yyparse ().
+/* This routine is called at the end of compilation.
Its job is to create all the code needed to initialize and
destroy the global aggregates. We do the destruction
first, since that way we only need to reverse the decls once. */
void
-cp_finish_file (void)
+cp_write_global_declarations (void)
{
tree vars;
bool reconsider;
what's left of the symbol table output. */
timevar_pop (TV_PARSE);
- if (flag_syntax_only || errorcount || sorrycount)
+ if (flag_syntax_only)
return;
lang_hooks.decls.final_write_globals ();
+
+ if (errorcount || sorrycount)
+ return;
+
cgraph_varpool_assemble_pending_decls ();
finish_aliases_2 ();