From e32ea2d1b2616cba725adfa4a87b2977a40e55be Mon Sep 17 00:00:00 2001
From: Richard Sandiford <rdsandiford@googlemail.com>
Date: Thu, 22 Dec 2011 21:28:40 +0000
Subject: tm.texi.in (TARGET_PREPARE_PCH_SAVE): New hook.

gcc/
	* doc/tm.texi.in (TARGET_PREPARE_PCH_SAVE): New hook.
	* doc/tm.texi: Regenerate.
	* target.def (prepare_pch_save): New hook.
	* c-family/c-pch.c (c_common_write_pch): Call it.
	* config/mips/mips.c (was_mips16_pch_p): Delete.
	(mips_set_mips16_mode): Don't refer to was_mips16_pch_p.
	(mips_prepare_pch_save): New function.
	(TARGET_PREPARE_PCH_SAVE): Define.

From-SVN: r182640
---
 gcc/target.def | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'gcc/target.def')

diff --git a/gcc/target.def b/gcc/target.def
index f5a5d54..b68673c 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -1819,6 +1819,15 @@ DEFHOOK
  const char *, (const void *data, size_t sz),
  default_pch_valid_p)
 
+DEFHOOK
+(prepare_pch_save,
+ "Called before writing out a PCH file.  If the target has some\n\
+garbage-collected data that needs to be in a particular state on PCH loads,\n\
+it can use this hook to enforce that state.  Very few targets need\n\
+to do anything here.",
+ void, (void),
+ hook_void_void)
+
 /* If nonnull, this function checks whether a PCH file with the
    given set of target flags can be used.  It returns NULL if so,
    otherwise it returns an error message.  */
-- 
cgit v1.1

