aboutsummaryrefslogtreecommitdiff
path: root/gcc/target.def
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2011-12-22 21:28:40 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2011-12-22 21:28:40 +0000
commite32ea2d1b2616cba725adfa4a87b2977a40e55be (patch)
tree86c95c2ba1ad59a3914d1b821fdd7358f55e43ad /gcc/target.def
parentdcf3062542089393814c0dbda875ec6a30a6b0b0 (diff)
downloadgcc-e32ea2d1b2616cba725adfa4a87b2977a40e55be.zip
gcc-e32ea2d1b2616cba725adfa4a87b2977a40e55be.tar.gz
gcc-e32ea2d1b2616cba725adfa4a87b2977a40e55be.tar.bz2
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
Diffstat (limited to 'gcc/target.def')
-rw-r--r--gcc/target.def9
1 files changed, 9 insertions, 0 deletions
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. */