diff gcc/tree.c @ 1:caeb520cebed

patch for CbC
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 17 Jul 2009 17:43:54 +0900
parents a06113de4d67
children 9de9dad105d4
line wrap: on
line diff
--- a/gcc/tree.c	Fri Jul 17 14:47:48 2009 +0900
+++ b/gcc/tree.c	Fri Jul 17 17:43:54 2009 +0900
@@ -90,6 +90,10 @@
 #undef DEFTREECODE
 #undef END_OF_BASE_TREE_CODES
 
+#ifndef noCbC
+#include "cbc-tree.h"
+#endif
+
 /* Each tree code class has an associated string representation.
    These must correspond to the tree_code_class entries.  */
 
@@ -5808,6 +5812,28 @@
   return type;
 }
 
+#ifndef noCbC
+tree
+build_code_segment_type (tree value_type, tree arg_types)
+{
+  tree t;
+  hashval_t hashcode = 0;
+
+  gcc_assert (TREE_CODE (value_type) == VOID_TYPE);
+
+  /* Make a node of the sort we want.  */
+  t = make_node (FUNCTION_TYPE);
+  TREE_TYPE (t) = value_type;
+  TYPE_ARG_TYPES (t) = arg_types;
+
+  CbC_IS_CODE_SEGMENT (t) = 1;
+
+  if (!COMPLETE_TYPE_P (t))
+    layout_type (t);
+  return t;
+}
+#endif
+
 /* Computes the canonical argument types from the argument type list
    ARGTYPES.