From 00de328a7ac2c812c0ea4f12c44fbd8d71028b91 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Wed, 24 Sep 2014 19:50:24 +0000 Subject: [PATCH] cgraph.h, [...]: Rename all instances of DECL_ABSTRACT to DECL_ABSTRACT_P. * cgraph.h, dbxout.c, dwarfout2.c, gimple-fold.c, lto-streamer-out.c, print-tree.c, symtab.c, tree-inline.c, tree-streamer-in.c, tree-streamer-out.c, tree.c, tree.h, varpool.c: Rename all instances of DECL_ABSTRACT to DECL_ABSTRACT_P. cp/ * class.c, decl.c, optimize.c: Rename all instances of DECL_ABSTRACT to DECL_ABSTRACT_P. lto/ * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to DECL_ABSTRACT_P. From-SVN: r215567 --- gcc/ChangeLog | 8 ++++++++ gcc/cgraph.h | 2 +- gcc/cp/ChangeLog | 5 +++++ gcc/cp/class.c | 2 +- gcc/cp/decl.c | 4 ++-- gcc/cp/optimize.c | 2 +- gcc/dbxout.c | 2 +- gcc/dwarf2out.c | 38 +++++++++++++++++++------------------- gcc/gimple-fold.c | 2 +- gcc/lto-streamer-out.c | 4 ++-- gcc/lto/ChangeLog | 5 +++++ gcc/lto/lto-symtab.c | 6 +++--- gcc/lto/lto.c | 4 ++-- gcc/print-tree.c | 2 +- gcc/symtab.c | 2 +- gcc/tree-inline.c | 2 +- gcc/tree-streamer-in.c | 2 +- gcc/tree-streamer-out.c | 2 +- gcc/tree.c | 2 +- gcc/tree.h | 2 +- gcc/varpool.c | 2 +- 21 files changed, 59 insertions(+), 41 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8874b914d7b..42b9820baa9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2014-09-24 Aldy Hernandez + + * cgraph.h, dbxout.c, dwarfout2.c, gimple-fold.c, + lto-streamer-out.c, print-tree.c, symtab.c, tree-inline.c, + tree-streamer-in.c, tree-streamer-out.c, tree.c, tree.h, + varpool.c: Rename all instances of DECL_ABSTRACT to + DECL_ABSTRACT_P. + 2014-09-24 Bill Schmidt * config/rs6000/rs6000.c (insn_is_swappable_p): Don't provide diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 6c046c73994..7e90bf07521 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -1975,7 +1975,7 @@ symtab_node::real_symbol_p (void) { cgraph_node *cnode; - if (DECL_ABSTRACT (decl)) + if (DECL_ABSTRACT_P (decl)) return false; if (!is_a (this)) return true; diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 194f0606ba6..ee5169f6c7c 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2014-09-24 Aldy Hernandez + + * class.c, decl.c, optimize.c: Rename all instances of + DECL_ABSTRACT to DECL_ABSTRACT_P. + 2014-09-24 Marek Polacek PR c/61405 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index 010ed25ea36..c4ac61bd0a0 100644 --- a/gcc/cp/class.c +++ b/gcc/cp/class.c @@ -4581,7 +4581,7 @@ clone_function_decl (tree fn, int update_method_vec_p) } /* Note that this is an abstract function that is never emitted. */ - DECL_ABSTRACT (fn) = 1; + DECL_ABSTRACT_P (fn) = true; } /* DECL is an in charge constructor, which is being defined. This will diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 12a9f43de2f..d26a432bf6e 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -2264,7 +2264,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend) } /* Preserve abstractness on cloned [cd]tors. */ - DECL_ABSTRACT (newdecl) = DECL_ABSTRACT (olddecl); + DECL_ABSTRACT_P (newdecl) = DECL_ABSTRACT_P (olddecl); /* Update newdecl's parms to point at olddecl. */ for (parm = DECL_ARGUMENTS (newdecl); parm; @@ -10280,7 +10280,7 @@ grokdeclarator (const cp_declarator *declarator, clones. The decloning optimization (for space) may revert this subsequently if it determines that the clones should share a common implementation. */ - DECL_ABSTRACT (decl) = 1; + DECL_ABSTRACT_P (decl) = true; } else if (current_class_type && constructor_name_p (unqualified_id, current_class_type)) diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c index 31acb073185..f37515ec257 100644 --- a/gcc/cp/optimize.c +++ b/gcc/cp/optimize.c @@ -270,7 +270,7 @@ maybe_thunk_body (tree fn, bool force) (for non-vague linkage ctors) or the COMDAT group (otherwise). */ populate_clone_array (fn, fns); - DECL_ABSTRACT (fn) = false; + DECL_ABSTRACT_P (fn) = false; if (!DECL_WEAK (fn)) { TREE_PUBLIC (fn) = false; diff --git a/gcc/dbxout.c b/gcc/dbxout.c index d856bddc115..91cedf7e9f2 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -1618,7 +1618,7 @@ dbxout_type_methods (tree type) /* Also ignore abstract methods; those are only interesting to the DWARF backends. */ - if (DECL_IGNORED_P (fndecl) || DECL_ABSTRACT (fndecl)) + if (DECL_IGNORED_P (fndecl) || DECL_ABSTRACT_P (fndecl)) continue; /* Redundantly output the plain name, since that's what gdb diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index e87ade255ee..1ae8dc32c49 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -3678,7 +3678,7 @@ decl_ultimate_origin (const_tree decl) /* DECL_ABSTRACT_ORIGIN can point to itself; ignore that if we're trying to output the abstract instance of this function. */ - if (DECL_ABSTRACT (decl) && DECL_ABSTRACT_ORIGIN (decl) == decl) + if (DECL_ABSTRACT_P (decl) && DECL_ABSTRACT_ORIGIN (decl) == decl) return NULL_TREE; /* Since the DECL_ABSTRACT_ORIGIN for a DECL is supposed to be the @@ -17434,7 +17434,7 @@ gen_entry_point_die (tree decl, dw_die_ref context_die) TYPE_UNQUALIFIED, context_die); } - if (DECL_ABSTRACT (decl)) + if (DECL_ABSTRACT_P (decl)) equate_decl_number_to_die (decl, decl_die); else add_AT_lbl_id (decl_die, DW_AT_low_pc, decl_start_label (decl)); @@ -17616,7 +17616,7 @@ gen_formal_parameter_die (tree node, tree origin, bool emit_name_p, else if (emit_name_p) add_name_and_src_coords_attributes (parm_die, node); if (origin == NULL - || (! DECL_ABSTRACT (node_or_origin) + || (! DECL_ABSTRACT_P (node_or_origin) && variably_modified_type_p (TREE_TYPE (node_or_origin), decl_function_context (node_or_origin)))) @@ -17635,7 +17635,7 @@ gen_formal_parameter_die (tree node, tree origin, bool emit_name_p, if (node && node != origin) equate_decl_number_to_die (node, parm_die); - if (! DECL_ABSTRACT (node_or_origin)) + if (! DECL_ABSTRACT_P (node_or_origin)) add_location_or_const_value_attribute (parm_die, node_or_origin, node == NULL, DW_AT_location); @@ -17920,7 +17920,7 @@ set_block_abstract_flags (tree stmt, int setting) } /* Given a pointer to some ..._DECL node, and a boolean value to set the - "abstract" flags to, set that value into the DECL_ABSTRACT flag for the + "abstract" flags to, set that value into the DECL_ABSTRACT_P flag for the given decl, and (in the case where the decl is a FUNCTION_DECL) also set the abstract flags for all of the parameters, local vars, local blocks and sub-blocks (recursively) to the same setting. */ @@ -17928,13 +17928,13 @@ set_block_abstract_flags (tree stmt, int setting) static void set_decl_abstract_flags (tree decl, int setting) { - DECL_ABSTRACT (decl) = setting; + DECL_ABSTRACT_P (decl) = setting; if (TREE_CODE (decl) == FUNCTION_DECL) { tree arg; for (arg = DECL_ARGUMENTS (decl); arg; arg = DECL_CHAIN (arg)) - DECL_ABSTRACT (arg) = setting; + DECL_ABSTRACT_P (arg) = setting; if (DECL_INITIAL (decl) != NULL_TREE && DECL_INITIAL (decl) != error_mark_node) set_block_abstract_flags (DECL_INITIAL (decl), setting); @@ -17979,7 +17979,7 @@ dwarf2out_abstract_function (tree decl) tail_call_site_count = -1; /* Be sure we've emitted the in-class declaration DIE (if any) first, so - we don't get confused by DECL_ABSTRACT. */ + we don't get confused by DECL_ABSTRACT_P. */ if (debug_info_level > DINFO_LEVEL_TERSE) { context = decl_class_context (decl); @@ -17992,7 +17992,7 @@ dwarf2out_abstract_function (tree decl) save_fn = current_function_decl; current_function_decl = decl; - was_abstract = DECL_ABSTRACT (decl); + was_abstract = DECL_ABSTRACT_P (decl); set_decl_abstract_flags (decl, 1); dwarf2out_decl (decl); if (! was_abstract) @@ -18128,7 +18128,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) premark_used_types (DECL_STRUCT_FUNCTION (decl)); - /* It is possible to have both DECL_ABSTRACT and DECLARATION be true if we + /* It is possible to have both DECL_ABSTRACT_P and DECLARATION be true if we started to generate the abstract instance of an inline, decided to output its containing class, and proceeded to emit the declaration of the inline from the member list for the class. If so, DECLARATION takes priority; @@ -18273,7 +18273,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) equate_decl_number_to_die (decl, subr_die); } } - else if (DECL_ABSTRACT (decl)) + else if (DECL_ABSTRACT_P (decl)) { if (DECL_DECLARED_INLINE_P (decl)) { @@ -18907,7 +18907,7 @@ gen_variable_die (tree decl, tree origin, dw_die_ref context_die) static variable, so we must test for the DW_AT_declaration flag. ??? Loop unrolling/reorder_blocks should perhaps be rewritten to - copy decls and set the DECL_ABSTRACT flag on them instead of + copy decls and set the DECL_ABSTRACT_P flag on them instead of sharing them. ??? Duplicated blocks have been rewritten to use .debug_ranges. @@ -18942,7 +18942,7 @@ gen_variable_die (tree decl, tree origin, dw_die_ref context_die) if ((origin == NULL && !specialization_p) || (origin != NULL - && !DECL_ABSTRACT (decl_or_origin) + && !DECL_ABSTRACT_P (decl_or_origin) && variably_modified_type_p (TREE_TYPE (decl_or_origin), decl_function_context (decl_or_origin)))) @@ -18971,11 +18971,11 @@ gen_variable_die (tree decl, tree origin, dw_die_ref context_die) if (declaration) add_AT_flag (var_die, DW_AT_declaration, 1); - if (decl && (DECL_ABSTRACT (decl) || declaration || old_die == NULL)) + if (decl && (DECL_ABSTRACT_P (decl) || declaration || old_die == NULL)) equate_decl_number_to_die (decl, var_die); if (! declaration - && (! DECL_ABSTRACT (decl_or_origin) + && (! DECL_ABSTRACT_P (decl_or_origin) /* Local static vars are shared between all clones/inlines, so emit DW_AT_location on the abstract DIE if DECL_RTL is already set. */ @@ -19031,7 +19031,7 @@ gen_label_die (tree decl, dw_die_ref context_die) else add_name_and_src_coords_attributes (lbl_die, decl); - if (DECL_ABSTRACT (decl)) + if (DECL_ABSTRACT_P (decl)) equate_decl_number_to_die (decl, lbl_die); else { @@ -19806,7 +19806,7 @@ gen_typedef_die (tree decl, dw_die_ref context_die) add_accessibility_attribute (type_die, decl); } - if (DECL_ABSTRACT (decl)) + if (DECL_ABSTRACT_P (decl)) equate_decl_number_to_die (decl, type_die); if (get_AT (type_die, DW_AT_name)) @@ -20538,7 +20538,7 @@ gen_decl_die (tree decl, tree origin, dw_die_ref context_die) /* If we're emitting an out-of-line copy of an inline function, emit info for the abstract instance and set up to refer to it. */ else if (cgraph_function_possibly_inlined_p (decl) - && ! DECL_ABSTRACT (decl) + && ! DECL_ABSTRACT_P (decl) && ! class_or_namespace_scope_p (context_die) /* dwarf2out_abstract_function won't emit a die if this is just a declaration. We must avoid setting DECL_ABSTRACT_ORIGIN in @@ -20927,7 +20927,7 @@ dwarf2out_decl (tree decl) where the inlined function is output in a different LTRANS unit or not at all. */ if (DECL_INITIAL (decl) == NULL_TREE - && ! DECL_ABSTRACT (decl)) + && ! DECL_ABSTRACT_P (decl)) return; /* If we're a nested function, initially use a parent of NULL; if we're diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index dc2c9428893..8ac22113387 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -85,7 +85,7 @@ can_refer_decl_in_current_unit_p (tree decl, tree from_decl) struct cgraph_node *node; symtab_node *snode; - if (DECL_ABSTRACT (decl)) + if (DECL_ABSTRACT_P (decl)) return false; /* We are concerned only about static/external vars and functions. */ diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index cff48eed6f6..dad751b9825 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -817,7 +817,7 @@ hash_tree (struct streamer_tree_cache_d *cache, hash_map *map, hstate.add_flag (DECL_NONLOCAL (t)); hstate.add_flag (DECL_VIRTUAL_P (t)); hstate.add_flag (DECL_IGNORED_P (t)); - hstate.add_flag (DECL_ABSTRACT (t)); + hstate.add_flag (DECL_ABSTRACT_P (t)); hstate.add_flag (DECL_ARTIFICIAL (t)); hstate.add_flag (DECL_USER_ALIGN (t)); hstate.add_flag (DECL_PRESERVE_P (t)); @@ -2432,7 +2432,7 @@ write_symbol (struct streamer_tree_cache_d *cache, symbol table. */ if (!TREE_PUBLIC (t) || is_builtin_fn (t) - || DECL_ABSTRACT (t) + || DECL_ABSTRACT_P (t) || (TREE_CODE (t) == VAR_DECL && DECL_HARD_REGISTER (t))) return; gcc_assert (TREE_CODE (t) != RESULT_DECL); diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 762296cc6b7..f1e25db96da 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,8 @@ +2014-09-24 Aldy Hernandez + + * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to + DECL_ABSTRACT_P. + 2014-09-23 Andi Kleen * lto-partition.c (node_cmp): Update comment. diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c index cf000760713..4ec1a73f2b1 100644 --- a/gcc/lto/lto-symtab.c +++ b/gcc/lto/lto-symtab.c @@ -653,7 +653,7 @@ lto_symtab_merge_symbols (void) /* Abstract functions may have duplicated cgraph nodes attached; remove them. */ - else if (cnode && DECL_ABSTRACT (cnode->decl) + else if (cnode && DECL_ABSTRACT_P (cnode->decl) && (cnode2 = cgraph_node::get (node->decl)) && cnode2 != cnode) cnode2->remove (); @@ -675,8 +675,8 @@ lto_symtab_prevailing_decl (tree decl) if ((!TREE_PUBLIC (decl) && !DECL_EXTERNAL (decl)) || is_builtin_fn (decl)) return decl; - /* DECL_ABSTRACTs are their own prevailng decl. */ - if (TREE_CODE (decl) == FUNCTION_DECL && DECL_ABSTRACT (decl)) + /* DECL_ABSTRACT_Ps are their own prevailing decl. */ + if (TREE_CODE (decl) == FUNCTION_DECL && DECL_ABSTRACT_P (decl)) return decl; /* Likewise builtins are their own prevailing decl. This preserves diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 570b1f7c35f..6cbb178db59 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -1048,7 +1048,7 @@ lto_register_function_decl_in_symtab (struct data_in *data_in, tree decl, { /* If this variable has already been declared, queue the declaration for merging. */ - if (TREE_PUBLIC (decl) && !DECL_ABSTRACT (decl)) + if (TREE_PUBLIC (decl) && !DECL_ABSTRACT_P (decl)) register_resolution (data_in->file_data, decl, get_resolution (data_in, ix)); } @@ -1249,7 +1249,7 @@ compare_tree_sccs_1 (tree t1, tree t2, tree **map) compare_values (DECL_NONLOCAL); compare_values (DECL_VIRTUAL_P); compare_values (DECL_IGNORED_P); - compare_values (DECL_ABSTRACT); + compare_values (DECL_ABSTRACT_P); compare_values (DECL_ARTIFICIAL); compare_values (DECL_USER_ALIGN); compare_values (DECL_PRESERVE_P); diff --git a/gcc/print-tree.c b/gcc/print-tree.c index eee0df9afc0..9563e4dfaec 100644 --- a/gcc/print-tree.c +++ b/gcc/print-tree.c @@ -362,7 +362,7 @@ print_node (FILE *file, const char *prefix, tree node, int indent) fputs (" unsigned", file); if (DECL_IGNORED_P (node)) fputs (" ignored", file); - if (DECL_ABSTRACT (node)) + if (DECL_ABSTRACT_P (node)) fputs (" abstract", file); if (DECL_EXTERNAL (node)) fputs (" external", file); diff --git a/gcc/symtab.c b/gcc/symtab.c index 76223b2f20e..f23bd83f469 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -1766,7 +1766,7 @@ symtab_node::get_partitioning_class (void) This include external delcarations. */ cgraph_node *cnode = dyn_cast (this); - if (DECL_ABSTRACT (decl)) + if (DECL_ABSTRACT_P (decl)) return SYMBOL_EXTERNAL; if (cnode && cnode->global.inlined_to) diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index ad474a58604..45838993602 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -5092,7 +5092,7 @@ copy_decl_no_change (tree decl, copy_body_data *id) copy = copy_node (decl); /* The COPY is not abstract; it will be generated in DST_FN. */ - DECL_ABSTRACT (copy) = 0; + DECL_ABSTRACT_P (copy) = false; lang_hooks.dup_lang_specific_decl (copy); /* TREE_ADDRESSABLE isn't used to indicate that a label's address has diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c index ee1c955f159..01a55bfdf1b 100644 --- a/gcc/tree-streamer-in.c +++ b/gcc/tree-streamer-in.c @@ -210,7 +210,7 @@ unpack_ts_decl_common_value_fields (struct bitpack_d *bp, tree expr) DECL_NONLOCAL (expr) = (unsigned) bp_unpack_value (bp, 1); DECL_VIRTUAL_P (expr) = (unsigned) bp_unpack_value (bp, 1); DECL_IGNORED_P (expr) = (unsigned) bp_unpack_value (bp, 1); - DECL_ABSTRACT (expr) = (unsigned) bp_unpack_value (bp, 1); + DECL_ABSTRACT_P (expr) = (unsigned) bp_unpack_value (bp, 1); DECL_ARTIFICIAL (expr) = (unsigned) bp_unpack_value (bp, 1); DECL_USER_ALIGN (expr) = (unsigned) bp_unpack_value (bp, 1); DECL_PRESERVE_P (expr) = (unsigned) bp_unpack_value (bp, 1); diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index 15ad8f8dbf6..2124d543a4b 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -178,7 +178,7 @@ pack_ts_decl_common_value_fields (struct bitpack_d *bp, tree expr) bp_pack_value (bp, DECL_NONLOCAL (expr), 1); bp_pack_value (bp, DECL_VIRTUAL_P (expr), 1); bp_pack_value (bp, DECL_IGNORED_P (expr), 1); - bp_pack_value (bp, DECL_ABSTRACT (expr), 1); + bp_pack_value (bp, DECL_ABSTRACT_P (expr), 1); bp_pack_value (bp, DECL_ARTIFICIAL (expr), 1); bp_pack_value (bp, DECL_USER_ALIGN (expr), 1); bp_pack_value (bp, DECL_PRESERVE_P (expr), 1); diff --git a/gcc/tree.c b/gcc/tree.c index 5f337179051..a46210ff1b2 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5008,7 +5008,7 @@ need_assembler_name_p (tree decl) return false; /* Abstract decls do not need an assembler name. */ - if (DECL_ABSTRACT (decl)) + if (DECL_ABSTRACT_P (decl)) return false; /* For VAR_DECLs, only static, public and external symbols need an diff --git a/gcc/tree.h b/gcc/tree.h index 14086f00539..cd3187dd05a 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -2062,7 +2062,7 @@ extern void protected_set_expr_location (tree, location_t); information, we mustn't try to generate any address information for nodes marked as "abstract instances" because we don't actually generate any code or allocate any data space for such instances. */ -#define DECL_ABSTRACT(NODE) \ +#define DECL_ABSTRACT_P(NODE) \ (DECL_COMMON_CHECK (NODE)->decl_common.abstract_flag) /* Language-specific decl information. */ diff --git a/gcc/varpool.c b/gcc/varpool.c index 3761f142ae7..ebb72bd1855 100644 --- a/gcc/varpool.c +++ b/gcc/varpool.c @@ -722,7 +722,7 @@ add_new_static_var (tree type) TREE_STATIC (new_decl) = 1; TREE_USED (new_decl) = 1; DECL_CONTEXT (new_decl) = NULL_TREE; - DECL_ABSTRACT (new_decl) = 0; + DECL_ABSTRACT_P (new_decl) = false; lang_hooks.dup_lang_specific_decl (new_decl); new_node = varpool_node::get_create (new_decl); varpool_node::finalize_decl (new_decl); -- 2.30.2