From: David Malcolm Date: Wed, 27 Aug 2014 19:38:19 +0000 (+0000) Subject: Convert PATTERN from a macro to a pair of inline functions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bd59c195f646d74e7a8cffb0cdc5aa31c720eb61;p=gcc.git 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. From-SVN: r214585 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index adb4c196b16..74767ab1756 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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 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)