aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-08-15 17:56:27 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-08-15 17:56:27 -0400
commitd947ba59f6380f698b6afeb29bebcb418559ebd2 (patch)
tree4931a62caf71a41300ec6883bf23e5158ec3634d
parent7695ec5fd4e6a7252beb0aef4b97a0d10ee448bf (diff)
downloadgcc-d947ba59f6380f698b6afeb29bebcb418559ebd2.zip
gcc-d947ba59f6380f698b6afeb29bebcb418559ebd2.tar.gz
gcc-d947ba59f6380f698b6afeb29bebcb418559ebd2.tar.bz2
(expand_elseif): New function.
From-SVN: r7931
-rw-r--r--gcc/stmt.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 0122873..e65b9fc 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -1932,6 +1932,17 @@ expand_start_else ()
cond_stack->data.cond.next_label = 0; /* No more _else or _elseif calls. */
}
+/* After calling expand_start_else, turn this "else" into an "else if"
+ by providing another condition. */
+
+void
+expand_elseif (cond)
+ tree cond;
+{
+ cond_stack->data.cond.next_label = gen_label_rtx ();
+ do_jump (cond, cond_stack->data.cond.next_label, NULL_RTX);
+}
+
/* Generate RTL for the end of an if-then.
Pop the record for it off of cond_stack. */