diff options
Diffstat (limited to 'gcc/symtab.c')
-rw-r--r-- | gcc/symtab.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/symtab.c b/gcc/symtab.c index ded6ecc..73168a8 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -273,8 +273,7 @@ symbol_table::change_decl_assembler_name (tree decl, tree name) /* We can have user ASM names on things, like global register variables, that are not in the symbol table. */ - if ((TREE_CODE (decl) == VAR_DECL - && (TREE_STATIC (decl) || DECL_EXTERNAL (decl))) + if ((VAR_P (decl) && (TREE_STATIC (decl) || DECL_EXTERNAL (decl))) || TREE_CODE (decl) == FUNCTION_DECL) node = symtab_node::get (decl); if (!DECL_ASSEMBLER_NAME_SET_P (decl)) @@ -602,8 +601,7 @@ symtab_node::maybe_create_reference (tree val, enum ipa_ref_use use_type, if (TREE_CODE (val) != ADDR_EXPR) return NULL; val = get_base_var (val); - if (val && (TREE_CODE (val) == FUNCTION_DECL - || TREE_CODE (val) == VAR_DECL)) + if (val && VAR_OR_FUNCTION_DECL_P (val)) { symtab_node *referred = symtab_node::get (val); gcc_checking_assert (referred); @@ -967,7 +965,7 @@ symtab_node::verify_base (void) } else if (is_a <varpool_node *> (this)) { - if (TREE_CODE (decl) != VAR_DECL) + if (!VAR_P (decl)) { error ("variable symbol is not variable"); error_found = true; @@ -1254,7 +1252,7 @@ symtab_node::make_decl_local (void) alias->make_decl_local (); } - if (TREE_CODE (decl) == VAR_DECL) + if (VAR_P (decl)) { DECL_COMMON (decl) = 0; /* ADDRESSABLE flag is not defined for public symbols. */ @@ -1303,7 +1301,7 @@ symtab_node::copy_visibility_from (symtab_node *n) alias->copy_visibility_from (n); } - if (TREE_CODE (decl) == VAR_DECL) + if (VAR_P (decl)) { DECL_COMMON (decl) = DECL_COMMON (n->decl); /* ADDRESSABLE flag is not defined for public symbols. */ @@ -2099,7 +2097,7 @@ symtab_node::can_increase_alignment_p (void) symtab_node *target = ultimate_alias_target (); /* For now support only variables. */ - if (TREE_CODE (decl) != VAR_DECL) + if (!VAR_P (decl)) return false; /* With -fno-toplevel-reorder we may have already output the constant. */ |