From 34f1b54530dc3f6aaf9c1054f91d2a9c87e3bba2 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 1 Aug 2014 16:42:44 -0400 Subject: [PATCH 221/236] Add insn method to rtx_expr_list gcc/ * rtl.h (rtx_expr_list::insn): New method. --- gcc/rtl.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gcc/rtl.h b/gcc/rtl.h index d028be1..d5811c2 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -414,6 +414,10 @@ public: /* Get at the underlying rtx. */ rtx element () const; + + /* Get at the rtx, casting to rtx_insn *. */ + rtx_insn *insn () const; + }; template <> @@ -1287,6 +1291,11 @@ inline rtx rtx_expr_list::element () const return XEXP (this, 0); } +inline rtx_insn *rtx_expr_list::insn () const +{ + return as_a (XEXP (this, 0)); +} + /* Methods of rtx_insn_list. */ inline rtx_insn_list *rtx_insn_list::next () const -- 1.8.5.3