assert: lower/upper_bound node may not be NULL.
[libfirm] / ir / tr / type.h
index a288b4a..e9e6d0e 100644 (file)
@@ -648,7 +648,10 @@ void  set_array_lower_bound  (type *array, int dimension, ir_node *lower_bound);
 void  set_array_lower_bound_int (type *array, int dimension, int lower_bound);
 void  set_array_upper_bound  (type *array, int dimension, ir_node *upper_bound);
 void  set_array_upper_bound_int (type *array, int dimension, int lower_bound);
+/* returns true is lower bound != Unknown */
+int       has_array_lower_bound  (type *array, int dimension);
 ir_node * get_array_lower_bound  (type *array, int dimension);
+int       has_array_upper_bound  (type *array, int dimension);
 ir_node * get_array_upper_bound  (type *array, int dimension);
 
 void set_array_order (type *array, int dimension, int order);
@@ -707,14 +710,21 @@ bool    is_enumeration_type     (type *enumeration);
 /**
  * @page pointer_type  Representation of a pointer type
  *
+ * The mode of the pointer type must be a mode_reference.
+ *
  * Pointer types:
  * - points_to:      The type of the entity this pointer points to.
  */
-/** Creates a new type pointer. */
-type *new_type_pointer           (ident *name, type *points_to);
 
-/** Creates a new type pointer with debug information. */
-type *new_d_type_pointer         (ident *name, type *points_to, dbg_info* db);
+/** Creates a new type pointer with mode mode_p. */
+#define new_type_pointer(N, P) new_type_pointer_mode(N, P, mode_P)
+//type *new_type_pointer           (ident *name, type *points_to);
+
+/** Creates a new type pointer with given pointer mode. */
+type *new_type_pointer_mode      (ident *name, type *points_to, ir_mode *ptr_mode);
+
+/** Creates a new type pointer given pointer mode and with debug information. */
+type *new_d_type_pointer         (ident *name, type *points_to, ir_mode *ptr_mode, dbg_info* db);
 
 /* --- manipulate fields of type_pointer --- */