]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-iterator.c (expr_only): Remove.
authorKazu Hirata <kazu@codesourcery.com>
Sat, 18 Apr 2009 11:47:22 +0000 (11:47 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Sat, 18 Apr 2009 11:47:22 +0000 (11:47 +0000)
* tree-iterator.c (expr_only): Remove.
* tree.h: Remove the prototype for expr_only.

From-SVN: r146311

gcc/ChangeLog
gcc/tree-iterator.c
gcc/tree.h

index c96e331e28343b8cd76ec407d5ed256bd2f0ee5a..2ee3685e9d0e50c1d4adee2aa1795263a4439e2c 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-18  Kazu Hirata  <kazu@codesourcery.com>
+
+       * tree-iterator.c (expr_only): Remove.
+       * tree.h: Remove the prototype for expr_only.
+
 2009-04-18  Kazu Hirata  <kazu@codesourcery.com>
 
        * reginfo.c (cannot_change_mode_set_regs): Remove.
index fabe780a9dc5d479723368ab58a2098251175505..43218f6b754a51e63c4831f584b5b9af6effbdc1 100644 (file)
@@ -280,29 +280,4 @@ expr_last (tree expr)
   return expr;
 }
 
-/* If EXPR is a single statement return it.  If EXPR is a
-   STATEMENT_LIST containing exactly one statement S, return S.
-   Otherwise, return NULL.  */
-
-tree 
-expr_only (tree expr)
-{
-  if (expr == NULL_TREE)
-    return NULL_TREE;
-
-  if (TREE_CODE (expr) == STATEMENT_LIST)
-    {
-      struct tree_statement_list_node *n = STATEMENT_LIST_TAIL (expr);
-      if (n && STATEMENT_LIST_HEAD (expr) == n)
-       return n->stmt;
-      else
-       return NULL_TREE;
-    }
-
-  if (TREE_CODE (expr) == COMPOUND_EXPR)
-    return NULL_TREE;
-
-  return expr;
-}
-
 #include "gt-tree-iterator.h"
index e2423ee434c2e6e68e7b93724ef31005ccb04039..a83151dfc2ed7f53dde8d754f6ef0cb22e3a1215 100644 (file)
@@ -4261,7 +4261,6 @@ extern tree convert (tree, tree);
 extern unsigned int expr_align (const_tree);
 extern tree expr_first (tree);
 extern tree expr_last (tree);
-extern tree expr_only (tree);
 extern tree size_in_bytes (const_tree);
 extern HOST_WIDE_INT int_size_in_bytes (const_tree);
 extern HOST_WIDE_INT max_int_size_in_bytes (const_tree);