aboutsummaryrefslogtreecommitdiff
path: root/gcc/lists.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/lists.c')
-rw-r--r--gcc/lists.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/lists.c b/gcc/lists.c
index f917523..77aeac3 100644
--- a/gcc/lists.c
+++ b/gcc/lists.c
@@ -188,4 +188,30 @@ remove_free_INSN_LIST_elem (rtx elem, rtx *listp)
free_INSN_LIST_node (remove_list_elem (elem, listp));
}
+/* Remove and free the first node in the INSN_LIST pointed to by LISTP. */
+rtx
+remove_free_INSN_LIST_node (rtx *listp)
+{
+ rtx node = *listp;
+ rtx elem = XEXP (node, 0);
+
+ remove_list_node (listp);
+ free_INSN_LIST_node (node);
+
+ return elem;
+}
+
+/* Remove and free the first node in the EXPR_LIST pointed to by LISTP. */
+rtx
+remove_free_EXPR_LIST_node (rtx *listp)
+{
+ rtx node = *listp;
+ rtx elem = XEXP (node, 0);
+
+ remove_list_node (listp);
+ free_EXPR_LIST_node (node);
+
+ return elem;
+}
+
#include "gt-lists.h"