summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.h
diff options
context:
space:
mode:
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-19 18:24:21 +0000
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-19 18:24:21 +0000
commitc781374e6e08121c8ab1fc7392482e02da0f8668 (patch)
tree027256b48c5fed3ba51c729ba3c322cf1b89e3f1 /gcc/emit-rtl.h
parentbe95c7c74a6ad721a2b82847f1604f0aec7ce311 (diff)
downloadgcc-c781374e6e08121c8ab1fc7392482e02da0f8668.tar.gz
Return rtx_insn from get_insns/get_last_insn
2014-08-19 David Malcolm <dmalcolm@redhat.com> * emit-rtl.h (get_insns): Strengthen return type from rtx to rtx_insn *, adding a checked cast for now. (get_last_insn): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214180 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.h')
-rw-r--r--gcc/emit-rtl.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/emit-rtl.h b/gcc/emit-rtl.h
index 8439750416b..e97e0cbfd5c 100644
--- a/gcc/emit-rtl.h
+++ b/gcc/emit-rtl.h
@@ -77,10 +77,11 @@ extern bool need_atomic_barrier_p (enum memmodel, bool);
/* Return the first insn of the current sequence or current function. */
-static inline rtx
+static inline rtx_insn *
get_insns (void)
{
- return crtl->emit.x_first_insn;
+ rtx insn = crtl->emit.x_first_insn;
+ return safe_as_a <rtx_insn *> (insn);
}
/* Specify a new insn as the first in the chain. */
@@ -94,10 +95,11 @@ set_first_insn (rtx insn)
/* Return the last insn emitted in current sequence or current function. */
-static inline rtx
+static inline rtx_insn *
get_last_insn (void)
{
- return crtl->emit.x_last_insn;
+ rtx insn = crtl->emit.x_last_insn;
+ return safe_as_a <rtx_insn *> (insn);
}
/* Specify a new insn as the last in the chain. */