aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2012-12-10 17:58:45 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2012-12-10 17:58:45 +0000
commit1185cc82aa29ac89a45ab03c06804f2dbc23c020 (patch)
tree4f9cd8ab0d8a00003b18b196bdd0de5c148cbc82
parentb7613cb7c3da7d08abb1c7e3d13386240be7d9ba (diff)
* decl2.c (cp_write_global_declarations): Return after writing a PCH.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@194363 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/decl2.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a5d0b76c615..50549a63a1a 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2012-12-10 Steven Bosscher <steven@gcc.gnu.org>
+
+ * decl2.c (cp_write_global_declarations): Return after writing a PCH.
+
2012-12-07 Jason Merrill <jason@redhat.com>
PR c++/55127
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 9ed53b819fc..fd54cac9047 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -3944,8 +3944,13 @@ cp_write_global_declarations (void)
|| !vec_safe_is_empty (decl_namespace_list))
return;
+ /* This is the point to write out a PCH if we're doing that.
+ In that case we do not want to do anything else. */
if (pch_file)
- c_common_write_pch ();
+ {
+ c_common_write_pch ();
+ return;
+ }
cgraph_process_same_body_aliases ();