From 6ffeceb15bc17d43de07000e1806690a9b6c3c68 Mon Sep 17 00:00:00 2001 From: hubicka Date: Sun, 24 May 2015 04:22:35 +0000 Subject: * tree.c (prototype_p, virtual_method_call_p, obj_type_ref_class, is_typedef_decl, typedef_variant_p): Constify. * tree.h (prototype_p, virtual_method_call_p, obj_type_ref_class, is_typedef_decl, typedef_variant_p): Constify. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223628 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/tree.c | 10 +++++----- gcc/tree.h | 10 +++++----- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 864ce021f8f..ef9b0f6ff47 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-05-22 Jan Hubicka + + * tree.c (prototype_p, virtual_method_call_p, obj_type_ref_class, + is_typedef_decl, typedef_variant_p): Constify. + * tree.h (prototype_p, virtual_method_call_p, obj_type_ref_class, + is_typedef_decl, typedef_variant_p): Constify. + 2015-05-23 Trevor Saunders * defaults.h (gen_tablejump): New function. diff --git a/gcc/tree.c b/gcc/tree.c index 8b0344697f0..320a343da0d 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -11579,7 +11579,7 @@ stdarg_p (const_tree fntype) /* Return true if TYPE has a prototype. */ bool -prototype_p (tree fntype) +prototype_p (const_tree fntype) { tree t; @@ -12005,7 +12005,7 @@ lhd_gcc_personality (void) can't apply.) */ bool -virtual_method_call_p (tree target) +virtual_method_call_p (const_tree target) { if (TREE_CODE (target) != OBJ_TYPE_REF) return false; @@ -12026,7 +12026,7 @@ virtual_method_call_p (tree target) /* REF is OBJ_TYPE_REF, return the class the ref corresponds to. */ tree -obj_type_ref_class (tree ref) +obj_type_ref_class (const_tree ref) { gcc_checking_assert (TREE_CODE (ref) == OBJ_TYPE_REF); ref = TREE_TYPE (ref); @@ -12124,7 +12124,7 @@ get_binfo_at_offset (tree binfo, HOST_WIDE_INT offset, tree expected_type) /* Returns true if X is a typedef decl. */ bool -is_typedef_decl (tree x) +is_typedef_decl (const_tree x) { return (x && TREE_CODE (x) == TYPE_DECL && DECL_ORIGINAL_TYPE (x) != NULL_TREE); @@ -12133,7 +12133,7 @@ is_typedef_decl (tree x) /* Returns true iff TYPE is a type variant created for a typedef. */ bool -typedef_variant_p (tree type) +typedef_variant_p (const_tree type) { return is_typedef_decl (TYPE_NAME (type)); } diff --git a/gcc/tree.h b/gcc/tree.h index 0b7b5239380..1957dc5645e 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -4375,9 +4375,9 @@ extern int operand_equal_for_phi_arg_p (const_tree, const_tree); extern tree create_artificial_label (location_t); extern const char *get_name (tree); extern bool stdarg_p (const_tree); -extern bool prototype_p (tree); -extern bool is_typedef_decl (tree x); -extern bool typedef_variant_p (tree); +extern bool prototype_p (const_tree); +extern bool is_typedef_decl (const_tree x); +extern bool typedef_variant_p (const_tree); extern bool auto_var_in_fn_p (const_tree, const_tree); extern tree build_low_bits_mask (tree, unsigned); extern bool tree_nop_conversion_p (const_tree, const_tree); @@ -4544,8 +4544,8 @@ extern location_t *block_nonartificial_location (tree); extern location_t tree_nonartificial_location (tree); extern tree block_ultimate_origin (const_tree); extern tree get_binfo_at_offset (tree, HOST_WIDE_INT, tree); -extern bool virtual_method_call_p (tree); -extern tree obj_type_ref_class (tree ref); +extern bool virtual_method_call_p (const_tree); +extern tree obj_type_ref_class (const_tree ref); extern bool types_same_for_odr (const_tree type1, const_tree type2, bool strict=false); extern bool contains_bitfld_component_ref_p (const_tree); -- cgit v1.2.1