+2014-09-24 Aldy Hernandez <aldyh@redhat.com>
+
+ * 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 <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (insn_is_swappable_p): Don't provide
{
cgraph_node *cnode;
- if (DECL_ABSTRACT (decl))
+ if (DECL_ABSTRACT_P (decl))
return false;
if (!is_a <cgraph_node *> (this))
return true;
+2014-09-24 Aldy Hernandez <aldyh@redhat.com>
+
+ * class.c, decl.c, optimize.c: Rename all instances of
+ DECL_ABSTRACT to DECL_ABSTRACT_P.
+
2014-09-24 Marek Polacek <polacek@redhat.com>
PR c/61405
}
/* 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
}
/* 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;
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))
(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;
/* 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
/* 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
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));
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))))
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);
}
/* 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. */
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);
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);
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)
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;
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))
{
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.
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))))
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. */
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
{
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))
/* 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
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
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. */
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));
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);
+2014-09-24 Aldy Hernandez <aldyh@redhat.com>
+
+ * lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
+ DECL_ABSTRACT_P.
+
2014-09-23 Andi Kleen <ak@linux.intel.com>
* lto-partition.c (node_cmp): Update comment.
/* 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 ();
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
{
/* 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));
}
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);
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);
This include external delcarations. */
cgraph_node *cnode = dyn_cast <cgraph_node *> (this);
- if (DECL_ABSTRACT (decl))
+ if (DECL_ABSTRACT_P (decl))
return SYMBOL_EXTERNAL;
if (cnode && cnode->global.inlined_to)
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
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);
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);
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
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. */
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);