+2014-08-21 David Malcolm <dmalcolm@redhat.com>
+
+ * debug.h (struct gcc_debug_hooks): Strengthen param 1 of hook
+ "label" from rtx to rtx_code_label *. Strengthen param 1 of
+ "var_location" hook from rtx to rtx_insn *.
+ (debug_nothing_rtx): Delete in favor of...
+ (debug_nothing_rtx_code_label): New prototype.
+ (debug_nothing_rtx_rtx): Delete unused prototype.
+ (debug_nothing_rtx_insn): New prototype.
+
+ * final.c (final_scan_insn): Add checked cast to rtx_insn * when
+ invoking debug_hooks->var_location (in two places, one in a NOTE
+ case of a switch statement, the other guarded by a CALL_P
+ conditional. Add checked cast to rtx_code_label * when invoking
+ debug_hooks->label (within CODE_LABEL case of switch statement).
+
+ * dbxout.c (dbx_debug_hooks): Update "label" hook from
+ debug_nothing_rtx to debug_nothing_rtx_code_label. Update
+ "var_location" from debug_nothing_rtx to debug_nothing_rtx_insn.
+ (xcoff_debug_hooks): Likewise.
+ * debug.c (do_nothing_debug_hooks): Likewise.
+ (debug_nothing_rtx): Delete in favor of...
+ (debug_nothing_rtx_insn): New function.
+ (debug_nothing_rtx_rtx): Delete unused function.
+ (debug_nothing_rtx_code_label): New function.
+ * dwarf2out.c (dwarf2_debug_hooks): Update "label" hook from
+ debug_nothing_rtx to debug_nothing_rtx_code_label.
+ (dwarf2out_var_location): Strengthen param "loc_note" from rtx
+ to rtx_insn *.
+ * sdbout.c (sdb_debug_hooks): Update "var_location" hook from
+ debug_nothing_rtx to debug_nothing_rtx_insn.
+ (sdbout_label): Strengthen param "insn" from rtx to
+ rtx_code_label *.
+ * vmsdbgout.c (vmsdbg_debug_hooks): Update "label" hook from
+ debug_nothing_rtx to debug_nothing_rtx_code_label. Update
+ "var_location" hook from debug_nothing_rtx to
+ debug_nothing_rtx_insn.
+
2014-08-21 David Malcolm <dmalcolm@redhat.com>
* recog.h (insn_output_fn): Update this function typedef to match
debug_nothing_tree_tree_tree_bool, /* imported_module_or_decl */
debug_nothing_tree, /* deferred_inline_function */
debug_nothing_tree, /* outlining_inline_function */
- debug_nothing_rtx, /* label */
+ debug_nothing_rtx_code_label, /* label */
dbxout_handle_pch, /* handle_pch */
- debug_nothing_rtx, /* var_location */
+ debug_nothing_rtx_insn, /* var_location */
debug_nothing_void, /* switch_text_section */
debug_nothing_tree_tree, /* set_name */
0, /* start_end_main_source_file */
debug_nothing_tree_tree_tree_bool, /* imported_module_or_decl */
debug_nothing_tree, /* deferred_inline_function */
debug_nothing_tree, /* outlining_inline_function */
- debug_nothing_rtx, /* label */
+ debug_nothing_rtx_code_label, /* label */
dbxout_handle_pch, /* handle_pch */
- debug_nothing_rtx, /* var_location */
+ debug_nothing_rtx_insn, /* var_location */
debug_nothing_void, /* switch_text_section */
debug_nothing_tree_tree, /* set_name */
0, /* start_end_main_source_file */
debug_nothing_tree_tree_tree_bool, /* imported_module_or_decl */
debug_nothing_tree, /* deferred_inline_function */
debug_nothing_tree, /* outlining_inline_function */
- debug_nothing_rtx, /* label */
+ debug_nothing_rtx_code_label, /* label */
debug_nothing_int, /* handle_pch */
- debug_nothing_rtx, /* var_location */
+ debug_nothing_rtx_insn, /* var_location */
debug_nothing_void, /* switch_text_section */
debug_nothing_tree_tree, /* set_name */
0, /* start_end_main_source_file */
}
void
-debug_nothing_rtx (rtx insn ATTRIBUTE_UNUSED)
+debug_nothing_rtx_insn (rtx_insn *insn ATTRIBUTE_UNUSED)
{
}
void
-debug_nothing_rtx_rtx (rtx insn ATTRIBUTE_UNUSED,
- rtx new_insn ATTRIBUTE_UNUSED)
+debug_nothing_rtx_code_label (rtx_code_label *label ATTRIBUTE_UNUSED)
{
}
/* Called from final_scan_insn for any CODE_LABEL insn whose
LABEL_NAME is non-null. */
- void (* label) (rtx);
+ void (* label) (rtx_code_label *);
/* Called after the start and before the end of writing a PCH file.
The parameter is 0 if after the start, 1 if before the end. */
void (* handle_pch) (unsigned int);
/* Called from final_scan_insn for any NOTE_INSN_VAR_LOCATION note. */
- void (* var_location) (rtx);
+ void (* var_location) (rtx_insn *);
/* Called from final_scan_insn if there is a switch between hot and cold
text sections. */
extern void debug_nothing_tree_int (tree, int);
extern void debug_nothing_tree_tree_tree_bool (tree, tree, tree, bool);
extern bool debug_true_const_tree (const_tree);
-extern void debug_nothing_rtx (rtx);
-extern void debug_nothing_rtx_rtx (rtx, rtx);
+extern void debug_nothing_rtx_insn (rtx_insn *);
+extern void debug_nothing_rtx_code_label (rtx_code_label *);
/* Hooks for various debug formats. */
extern const struct gcc_debug_hooks do_nothing_debug_hooks;
static void dwarf2out_imported_module_or_decl_1 (tree, tree, tree,
dw_die_ref);
static void dwarf2out_abstract_function (tree);
-static void dwarf2out_var_location (rtx);
+static void dwarf2out_var_location (rtx_insn *);
static void dwarf2out_begin_function (tree);
static void dwarf2out_end_function (unsigned int);
static void dwarf2out_set_name (tree, tree);
emitting the abstract description of inline functions until
something tries to reference them. */
dwarf2out_abstract_function, /* outlining_inline_function */
- debug_nothing_rtx, /* label */
+ debug_nothing_rtx_code_label, /* label */
debug_nothing_int, /* handle_pch */
dwarf2out_var_location,
dwarf2out_switch_text_section,
our lookup table. */
static void
-dwarf2out_var_location (rtx loc_note)
+dwarf2out_var_location (rtx_insn *loc_note)
{
char loclabel[MAX_ARTIFICIAL_LABEL_BYTES + 2];
struct var_loc_node *newloc;
case NOTE_INSN_VAR_LOCATION:
case NOTE_INSN_CALL_ARG_LOCATION:
if (!DECL_IGNORED_P (current_function_decl))
- debug_hooks->var_location (insn);
+ debug_hooks->var_location (as_a <rtx_insn *> (insn));
break;
default:
CC_STATUS_INIT;
if (!DECL_IGNORED_P (current_function_decl) && LABEL_NAME (insn))
- debug_hooks->label (insn);
+ debug_hooks->label (as_a <rtx_code_label *> (insn));
app_disable ();
assemble_external (t);
}
if (!DECL_IGNORED_P (current_function_decl))
- debug_hooks->var_location (insn);
+ debug_hooks->var_location (as_a <rtx_insn *> (insn));
}
/* Output assembler code from the template. */
static void sdbout_begin_function (tree);
static void sdbout_end_function (unsigned int);
static void sdbout_toplevel_data (tree);
-static void sdbout_label (rtx);
+static void sdbout_label (rtx_code_label *);
static char *gen_fake_label (void);
static int plain_type (tree);
static int template_name_p (tree);
debug_nothing_tree, /* outlining_inline_function */
sdbout_label, /* label */
debug_nothing_int, /* handle_pch */
- debug_nothing_rtx, /* var_location */
+ debug_nothing_rtx_insn, /* var_location */
debug_nothing_void, /* switch_text_section */
debug_nothing_tree_tree, /* set_name */
0, /* start_end_main_source_file */
is present. */
static void
-sdbout_label (rtx insn)
+sdbout_label (rtx_code_label *insn)
{
PUT_SDB_DEF (LABEL_NAME (insn));
PUT_SDB_VAL (insn);
debug_nothing_tree_tree_tree_bool, /* imported_module_or_decl */
debug_nothing_tree, /* deferred_inline_function */
vmsdbgout_abstract_function,
- debug_nothing_rtx, /* label */
+ debug_nothing_rtx_code_label, /* label */
debug_nothing_int, /* handle_pch */
- debug_nothing_rtx, /* var_location */
+ debug_nothing_rtx_insn, /* var_location */
debug_nothing_void, /* switch_text_section */
debug_nothing_tree_tree, /* set_name */
0, /* start_end_main_source_file */