diff options
author | Jason Merrill <jason@redhat.com> | 2023-09-08 11:27:26 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2023-09-17 23:40:27 -0400 |
commit | 93996cfb308ffc633a23d0f1b72bcdc086bed864 (patch) | |
tree | 24dac77951d938432690c9701418f4318774ac99 /gcc | |
parent | d5d45465b2b4376731c9ab8cd96b51a66496a492 (diff) | |
download | gcc-93996cfb308ffc633a23d0f1b72bcdc086bed864.zip gcc-93996cfb308ffc633a23d0f1b72bcdc086bed864.tar.gz gcc-93996cfb308ffc633a23d0f1b72bcdc086bed864.tar.bz2 |
doc: GTY((cache)) documentation tweak
gcc/ChangeLog:
* doc/gty.texi: Add discussion of cache vs. deletable.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/doc/gty.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/doc/gty.texi b/gcc/doc/gty.texi index 15f9fa0..1dfe465 100644 --- a/gcc/doc/gty.texi +++ b/gcc/doc/gty.texi @@ -306,6 +306,13 @@ called on that variable between the mark and sweep phases of garbage collection. The gt_clear_cache function is free to mark blocks as used, or to clear pointers in the variable. +In a hash table, the @samp{gt_cleare_cache} function discards entries +if the key is not marked, or marks the value if the key is marked. + +Note that caches should generally use @code{deletable} instead; +@code{cache} is only preferable if the value is impractical to +recompute from the key when needed. + @findex deletable @item deletable |