- int i, n_ents;
- ir_node *addr;
-
- if (get_irn_op(n) == op_Alloc) {
- add_type_alloc(get_Alloc_type(n), n);
- return;
- } else
-
- if (get_irn_op(n) == op_Cast) {
- add_type_cast(get_Cast_type(n), n);
- return;
- } else
-
- if (get_irn_op(n) == op_Sel) {
- add_entity_reference(get_Sel_entity(n), n);
- return;
- } else if (get_irn_op(n) == op_SymConst && (get_SymConst_kind(n) == symconst_addr_ent)) {
- add_entity_reference(get_SymConst_entity(n), n);
- return;
- } else
-
- if (is_memop(n)) {
- addr = get_memop_ptr(n);
- } else if (get_irn_op(n) == op_Call) {
- addr = get_Call_ptr(n);
- if (get_irn_op(addr) != op_Sel) return; /* Sels before Calls mean a Load / polymorphic Call. */
- } else {
- return;
- }
-
- n_ents = get_addr_n_entities(addr); /* == 1 */
- for (i = 0; i < n_ents; ++i) {
- entity *ent = get_addr_entity(addr, i);
- if (ent)
- add_entity_access(ent, n);
- //else
- //add_unrecognized_access(n);
- }
-}
-
-static void chain_types(type *tp) {
- if (is_Pointer_type(tp)) {
- add_type_pointertype_to(get_pointer_points_to_type(tp), tp);
- }
+ int i, n_ents;
+ ir_node *addr;
+
+ (void) env;
+ if (get_irn_op(n) == op_Alloc) {
+ add_type_alloc(get_Alloc_type(n), n);
+ return;
+ } else if (get_irn_op(n) == op_Cast) {
+ add_type_cast(get_Cast_type(n), n);
+ return;
+ } else if (is_Sel(n)) {
+ add_entity_reference(get_Sel_entity(n), n);
+ return;
+ } else if (is_SymConst_addr_ent(n)) {
+ add_entity_reference(get_SymConst_entity(n), n);
+ return;
+ } else if (is_memop(n)) {
+ addr = get_memop_ptr(n);
+ } else if (get_irn_op(n) == op_Call) {
+ addr = get_Call_ptr(n);
+ if (! is_Sel(addr)) return; /* Sels before Calls mean a Load / polymorphic Call. */
+ } else {
+ return;
+ }
+
+ n_ents = get_addr_n_entities(addr); /* == 1 */
+ for (i = 0; i < n_ents; ++i) {
+ ir_entity *ent = get_addr_entity(addr, i);
+ if (ent)
+ add_entity_access(ent, n);
+ //else
+ //add_unrecognized_access(n);
+ }
+}
+
+/**
+ * Handle chain types (pointer, array) by adding them to
+ * its "inner" type.
+ */
+static void chain_types(ir_type *tp) {
+ if (is_Pointer_type(tp)) {
+ add_type_pointertype_to(get_pointer_points_to_type(tp), tp);
+ } else if (is_Array_type(tp)) {
+ add_type_arraytype_of(get_array_element_type(tp), tp);
+ }