diff options
author | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-29 00:02:25 +0000 |
---|---|---|
committer | dmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-29 00:02:25 +0000 |
commit | a3e1146a0fef38f71d283d1f4c6e5072bc87db3e (patch) | |
tree | 44b9ba0f456c4bbde529572156622d836060ca82 /gcc | |
parent | d5f3ed726f99113ea33f4b4ec9dc897b231114dd (diff) | |
download | gcc-a3e1146a0fef38f71d283d1f4c6e5072bc87db3e.tar.gz |
Make INSN_HAS_LOCATION require an rtx_insn
gcc/
2014-08-28 David Malcolm <dmalcolm@redhat.com>
* rtl.h (INSN_HAS_LOCATION): Strengthen param from const_rtx to
const rtx_insn *.
* print-rtl.c (print_rtx): Add checked cast to const rtx_insn *
in invocation of INSN_HAS_LOCATION.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214700 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/print-rtl.c | 2 | ||||
-rw-r--r-- | gcc/rtl.h | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d1a1fdcb3ce..1c6df0d03cb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2014-08-28 David Malcolm <dmalcolm@redhat.com> + + * rtl.h (INSN_HAS_LOCATION): Strengthen param from const_rtx to + const rtx_insn *. + + * print-rtl.c (print_rtx): Add checked cast to const rtx_insn * + in invocation of INSN_HAS_LOCATION. + 2014-08-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com> * config/rs6000/altivec.h (vec_xl): New #define. diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c index be1d01ac6c3..935145b5bd6 100644 --- a/gcc/print-rtl.c +++ b/gcc/print-rtl.c @@ -395,7 +395,7 @@ print_rtx (const_rtx in_rtx) /* Pretty-print insn locations. Ignore scoping as it is mostly redundant with line number information and do not print anything when there is no location information available. */ - if (INSN_HAS_LOCATION (in_rtx)) + if (INSN_HAS_LOCATION (as_a <const rtx_insn *> (in_rtx))) { expanded_location xloc = insn_location (in_rtx); fprintf (outfile, " %s:%i", xloc.file, xloc.line); diff --git a/gcc/rtl.h b/gcc/rtl.h index 1c47c20abcc..1bfb5bc7032 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1374,7 +1374,7 @@ inline unsigned int& INSN_LOCATION (rtx insn) return XUINT (insn, 4); } -inline bool INSN_HAS_LOCATION (const_rtx insn) +inline bool INSN_HAS_LOCATION (const rtx_insn *insn) { return LOCATION_LOCUS (INSN_LOCATION (insn)) != UNKNOWN_LOCATION; } |