aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2014-08-27 19:38:19 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2014-08-27 19:38:19 +0000
commitbd59c195f646d74e7a8cffb0cdc5aa31c720eb61 (patch)
treeac15994ce01897bedf24ccc5768981007453b0a7
parentac44248e6abd1bfc0ed92a9ef66fbf4987cdea96 (diff)
downloadgcc-bd59c195f646d74e7a8cffb0cdc5aa31c720eb61.zip
gcc-bd59c195f646d74e7a8cffb0cdc5aa31c720eb61.tar.gz
gcc-bd59c195f646d74e7a8cffb0cdc5aa31c720eb61.tar.bz2
Convert PATTERN from a macro to a pair of inline functions
gcc/ 2014-08-27 David Malcolm <dmalcolm@redhat.com> * rtl.h (PATTERN): Convert this macro into a pair of inline functions, for now, requiring const_rtx and rtx. From-SVN: r214585
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/rtl.h10
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index adb4c19..74767ab 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2014-08-27 David Malcolm <dmalcolm@redhat.com>
+ * rtl.h (PATTERN): Convert this macro into a pair of inline
+ functions, for now, requiring const_rtx and rtx.
+
+2014-08-27 David Malcolm <dmalcolm@redhat.com>
+
* target.def (unwind_emit): Strengthen param "insn" from rtx to
rtx_insn *.
(final_postscan_insn): Likewise.
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 8d74d36..fdf1841 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1207,7 +1207,15 @@ inline rtx& SET_NEXT_INSN (rtx insn)
#define BLOCK_FOR_INSN(INSN) XBBDEF (INSN, 2)
/* The body of an insn. */
-#define PATTERN(INSN) XEXP (INSN, 3)
+inline rtx PATTERN (const_rtx insn)
+{
+ return XEXP (insn, 3);
+}
+
+inline rtx& PATTERN (rtx insn)
+{
+ return XEXP (insn, 3);
+}
#define INSN_LOCATION(INSN) XUINT (INSN, 4)