diff options
author | Richard Biener <rguenther@suse.de> | 2015-09-17 07:48:09 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-09-17 07:48:09 +0000 |
commit | b5415a9ebcc06c18bda279c284d98e9b8ff8af22 (patch) | |
tree | a47e69f9f988fa1978fb63d2deaa5b3c69e957aa | |
parent | 8c464611a3d61ad24af1f3461de8ed283aed3aa4 (diff) | |
download | gcc-b5415a9ebcc06c18bda279c284d98e9b8ff8af22.zip gcc-b5415a9ebcc06c18bda279c284d98e9b8ff8af22.tar.gz gcc-b5415a9ebcc06c18bda279c284d98e9b8ff8af22.tar.bz2 |
cp-tree.h (note_decl_for_pch): Remove.
2015-09-17 Richard Biener <rguenther@suse.de>
* cp-tree.h (note_decl_for_pch): Remove.
* class.c (build_clone): Do not call note_decl_for_pch.
* semantics.c (finish_member_declaration): Likewise.
(note_decl_for_pch): Remove.
* decl2.c (c_parse_final_cleanups): Mangle all globals before
writing the PCH.
From-SVN: r227846
-rw-r--r-- | gcc/cp/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cp/class.c | 3 | ||||
-rw-r--r-- | gcc/cp/cp-tree.h | 1 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 6 | ||||
-rw-r--r-- | gcc/cp/semantics.c | 20 |
5 files changed, 15 insertions, 24 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index c264f48..b9aad33 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,12 @@ +2015-09-17 Richard Biener <rguenther@suse.de> + + * cp-tree.h (note_decl_for_pch): Remove. + * class.c (build_clone): Do not call note_decl_for_pch. + * semantics.c (finish_member_declaration): Likewise. + (note_decl_for_pch): Remove. + * decl2.c (c_parse_final_cleanups): Mangle all globals before + writing the PCH. + 2015-09-14 Jason Merrill <jason@redhat.com> PR c++/44282 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index f8ba795..9611dec 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -4691,9 +4691,6 @@ build_clone (tree fn, tree name) SET_DECL_RTL (clone, NULL); rest_of_decl_compilation (clone, /*top_level=*/1, at_eof); - if (pch_file) - note_decl_for_pch (clone); - return clone; } diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 784a616..8643e08 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -6253,7 +6253,6 @@ extern tree finish_qualified_id_expr (tree, tree, bool, bool, bool, bool, tsubst_flags_t); extern void simplify_aggr_init_expr (tree *); extern void finalize_nrv (tree *, tree, tree); -extern void note_decl_for_pch (tree); extern tree omp_reduction_id (enum tree_code, tree, tree); extern tree cp_remove_omp_priv_cleanup_stmt (tree *, int *, void *); extern void cp_check_omp_declare_reduction (tree); diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 6c1f084..a5b44e0 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -4511,6 +4511,12 @@ c_parse_final_cleanups (void) In that case we do not want to do anything else. */ if (pch_file) { + /* Mangle all symbols at PCH creation time. */ + symtab_node *node; + FOR_EACH_SYMBOL (node) + if (! is_a <varpool_node *> (node) + || ! DECL_HARD_REGISTER (node->decl)) + DECL_ASSEMBLER_NAME (node->decl); c_common_write_pch (); dump_tu (); return; diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 0897ff7..7215dc6 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2951,26 +2951,6 @@ finish_member_declaration (tree decl) maybe_add_class_template_decl_list (current_class_type, decl, /*friend_p=*/0); } - - if (pch_file) - note_decl_for_pch (decl); -} - -/* DECL has been declared while we are building a PCH file. Perform - actions that we might normally undertake lazily, but which can be - performed now so that they do not have to be performed in - translation units which include the PCH file. */ - -void -note_decl_for_pch (tree decl) -{ - gcc_assert (pch_file); - - /* There's a good chance that we'll have to mangle names at some - point, even if only for emission in debugging information. */ - if (VAR_OR_FUNCTION_DECL_P (decl) - && !processing_template_decl) - mangle_decl (decl); } /* Finish processing a complete template declaration. The PARMS are |