From 80ff69443560f4db8cc1f79927c254d7274341b2 Mon Sep 17 00:00:00 2001 From: dmalcolm Date: Wed, 27 Aug 2014 19:38:19 +0000 Subject: [PATCH] Convert PATTERN from a macro to a pair of inline functions gcc/ 2014-08-27 David Malcolm * rtl.h (PATTERN): Convert this macro into a pair of inline functions, for now, requiring const_rtx and rtx. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214585 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/rtl.h | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index adb4c196b16..74767ab1756 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2014-08-27 David Malcolm + * rtl.h (PATTERN): Convert this macro into a pair of inline + functions, for now, requiring const_rtx and rtx. + +2014-08-27 David Malcolm + * 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 8d74d366186..fdf18417032 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) -- 2.11.4.GIT