aboutsummaryrefslogtreecommitdiff
path: root/gcc/ggc.h
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2023-07-03 16:32:37 +0200
committerUros Bizjak <ubizjak@gmail.com>2023-07-03 16:33:11 +0200
commit9a856f67ee2f13ea1b17ca79e71b1d10ca03afa4 (patch)
tree1e8da0b3262a87691ae824280086ca0effe1fb54 /gcc/ggc.h
parentb8806f6ffbe72ed8fb7aba3b3a9196ec4d13e614 (diff)
downloadgcc-9a856f67ee2f13ea1b17ca79e71b1d10ca03afa4.zip
gcc-9a856f67ee2f13ea1b17ca79e71b1d10ca03afa4.tar.gz
gcc-9a856f67ee2f13ea1b17ca79e71b1d10ca03afa4.tar.bz2
tree+ggc: Change return type of predicate functions from int to bool
Also change internal variable from int to bool. gcc/ChangeLog: * tree.h (tree_int_cst_equal): Change return type from int to bool. (operand_equal_for_phi_arg_p): Ditto. (tree_map_base_marked_p): Ditto. * tree.cc (contains_placeholder_p): Update function body for bool return type. (type_cache_hasher::equal): Ditto. (tree_map_base_hash): Change return type from int to void and adjust function body accordingly. (tree_int_cst_equal): Ditto. (operand_equal_for_phi_arg_p): Ditto. (get_narrower): Change "first" variable to bool. (cl_option_hasher::equal): Update function body for bool return type. * ggc.h (ggc_set_mark): Change return type from int to bool. (ggc_marked_p): Ditto. * ggc-page.cc (gt_ggc_mx): Change return type from int to void and adjust function body accordingly. (ggc_set_mark): Ditto.
Diffstat (limited to 'gcc/ggc.h')
-rw-r--r--gcc/ggc.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/ggc.h b/gcc/ggc.h
index 78eab7e..34108e2 100644
--- a/gcc/ggc.h
+++ b/gcc/ggc.h
@@ -90,15 +90,15 @@ extern const struct ggc_root_tab * const gt_pch_scalar_rtab[];
/* Actually set the mark on a particular region of memory, but don't
follow pointers. This function is called by ggc_mark_*. It
- returns zero if the object was not previously marked; nonzero if
+ returns false if the object was not previously marked; true if
the object was already marked, or if, for any other reason,
pointers in this data structure should not be traversed. */
-extern int ggc_set_mark (const void *);
+extern bool ggc_set_mark (const void *);
-/* Return 1 if P has been marked, zero otherwise.
+/* Return true if P has been marked, zero otherwise.
P must have been allocated by the GC allocator; it mustn't point to
static objects, stack variables, or memory allocated with malloc. */
-extern int ggc_marked_p (const void *);
+extern bool ggc_marked_p (const void *);
/* PCH and GGC handling for strings, mostly trivial. */
extern void gt_pch_n_S (const void *);