diff mbox

[pph] Append DECL_CONTEXT of global namespace to cache in preload (issue4629081)

Message ID 20110628223711.42ECA1C124A@gchare.mtv.corp.google.com
State New
Headers show

Commit Message

Gab Charette June 28, 2011, 10:37 p.m. UTC
We need members of the global namespace to point to the global translation unit decl.
Thus we will append DECL_CONTEXT of global namespace to cache in preload.

This doesn't fix any tests, but helps towards making the tree nodes identicals in pph-mode.

Tested with bootstrap build and pph regression testing.

2011-06-28  Gabriel Charette  <gchare@google.com>

	* pph-streamer.c (pph_preload_common_nodes):
	Append DECL_CONTEXT of global_namespace to cache.


--
This patch is available for review at http://codereview.appspot.com/4629081

Comments

Diego Novillo June 28, 2011, 10:42 p.m. UTC | #1
On Tue, Jun 28, 2011 at 18:37, Gabriel Charette <gchare@google.com> wrote:

> 2011-06-28  Gabriel Charette  <gchare@google.com>
>
>        * pph-streamer.c (pph_preload_common_nodes):
>        Append DECL_CONTEXT of global_namespace to cache.

OK.


Diego.
diff mbox

Patch

diff --git a/gcc/cp/pph-streamer.c b/gcc/cp/pph-streamer.c
index c62864a..b7ad486 100644
--- a/gcc/cp/pph-streamer.c
+++ b/gcc/cp/pph-streamer.c
@@ -91,6 +91,8 @@  pph_preload_common_nodes (struct lto_streamer_cache_d *cache)
     }
 
   lto_streamer_cache_append (cache, global_namespace);
+
+  lto_streamer_cache_append (cache, DECL_CONTEXT (global_namespace));
 }