[gcc(refs/users/marxin/heads/casm-state-v3)] Save asm_out_state with PCH.

Martin Liska marxin@gcc.gnu.org
Tue Sep 14 12:35:44 GMT 2021


https://gcc.gnu.org/g:e74ea88936976a0e8798f16c570a4b92d6095324

commit e74ea88936976a0e8798f16c570a4b92d6095324
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Sep 8 13:08:26 2021 +0200

    Save asm_out_state with PCH.

Diff:
---
 gcc/ggc-common.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c
index 32ba5be42b2..c383605f813 100644
--- a/gcc/ggc-common.c
+++ b/gcc/ggc-common.c
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "hosthooks.h"
 #include "plugin.h"
 #include "options.h"
+#include "output.h"
 
 /* When true, protect the contents of the identifier hash table.  */
 bool ggc_protect_identifiers = true;
@@ -589,6 +590,9 @@ gt_pch_restore (FILE *f)
   struct mmap_info mmi;
   int result;
 
+  /* Hide ASM state object as we don't want it to be streamed.  */
+  FILE *saved_casm_out_file = casm->out_file;
+
   /* Delete any deletable objects.  This makes ggc_pch_read much
      faster, as it can be sure that no GCable objects remain other
      than the ones just read in.  */
@@ -629,6 +633,8 @@ gt_pch_restore (FILE *f)
   ggc_pch_read (f, mmi.preferred_base);
 
   gt_pch_restore_stringpool ();
+
+  casm->out_file = saved_casm_out_file;
 }
 
 /* Default version of HOST_HOOKS_GT_PCH_GET_ADDRESS when mmap is not present.


More information about the Gcc-cvs mailing list