From 3400cb8f4a626e31054034d80044b07df341d311 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 18 Jun 2014 12:12:33 -0400 Subject: [PATCH 026/236] bb_note returns a rtx_note * gcc/ * basic-block.h (bb_note): Strengthen return type from rtx to rtx_note *. * sched-int.h (bb_note): Likewise. * cfgrtl.c (bb_note): Likewise. Add a checked cast to rtx_note *. --- gcc/basic-block.h | 2 +- gcc/cfgrtl.c | 4 ++-- gcc/sched-int.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/basic-block.h b/gcc/basic-block.h index d6aebb4..518dce2 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -801,7 +801,7 @@ extern basic_block * single_pred_before_succ_order (void); /* In cfgrtl.c */ extern rtx block_label (basic_block); -extern rtx bb_note (basic_block); +extern rtx_note *bb_note (basic_block); extern bool purge_all_dead_edges (void); extern bool purge_dead_edges (basic_block); extern bool fixup_abnormal_edges (void); diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 688528a..11bb89d 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -661,7 +661,7 @@ could_fall_through (basic_block src, basic_block target) } /* Return the NOTE_INSN_BASIC_BLOCK of BB. */ -rtx +rtx_note * bb_note (basic_block bb) { rtx note; @@ -671,7 +671,7 @@ bb_note (basic_block bb) note = NEXT_INSN (note); gcc_assert (NOTE_INSN_BASIC_BLOCK_P (note)); - return note; + return as_a (note); } /* Return the INSN immediately following the NOTE_INSN_BASIC_BLOCK diff --git a/gcc/sched-int.h b/gcc/sched-int.h index 3680889..7f236a1 100644 --- a/gcc/sched-int.h +++ b/gcc/sched-int.h @@ -1368,7 +1368,7 @@ extern void sched_change_pattern (rtx, rtx); extern int sched_speculate_insn (rtx, ds_t, rtx *); extern void unlink_bb_notes (basic_block, basic_block); extern void add_block (basic_block, basic_block); -extern rtx bb_note (basic_block); +extern rtx_note *bb_note (basic_block); extern void concat_note_lists (rtx, rtx *); extern rtx sched_emit_insn (rtx); extern rtx get_ready_element (int); -- 1.8.5.3