From: Michael Beck Date: Wed, 5 Jan 2005 14:25:54 +0000 (+0000) Subject: renames all is_x*_type() functions to is_X*_type() to prevent name clash with EDG... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=5940b77567126bc51a3225d166716ba1bca784ee;p=libfirm renames all is_x*_type() functions to is_X*_type() to prevent name clash with EDG fronten [r4816] --- diff --git a/ir/ana2/pto_init.c b/ir/ana2/pto_init.c index 2a8f9eb07..0d416206b 100644 --- a/ir/ana2/pto_init.c +++ b/ir/ana2/pto_init.c @@ -111,9 +111,9 @@ static pto_t* new_symconst_pto (ir_node *symconst) calculation, but if it's the mumble itself, it's just the same, except it's presumably a constant of mumble. In any case, we need to branch on this. "How's that for object fucking oriented? --jwz" */ - if (is_pointer_type (get_entity_type (ent))) { + if (is_Pointer_type (get_entity_type (ent))) { desc = new_ent_name (ent); - } else if (is_class_type (get_entity_type (ent))) { + } else if (is_Class_type (get_entity_type (ent))) { desc = new_name (get_entity_type (ent), symconst, -1); } else { fprintf (stderr, "new_symconst_pto(): not handled: %s[%li] (\"%s\")\n", @@ -136,7 +136,7 @@ static void clear_type_link (type_or_ent *thing, void *_unused) if (is_type (thing)) { type *tp = (type*) thing; - if (is_class_type (tp)) { + if (is_Class_type (tp)) { DBGPRINT (1, (stdout, "clear_type_link() (\"%s\")\n", get_type_name (tp))); @@ -224,7 +224,7 @@ static void init_pto (ir_node *node, void *env) if (mode_is_reference(get_irn_mode (node))) { entity *ent = get_SymConst_entity (node); type *tp = get_entity_type (ent); - if (is_class_type (tp) || is_pointer_type (tp)) { + if (is_Class_type (tp) || is_Pointer_type (tp)) { pto_t *symconst_pto = new_symconst_pto (node); set_node_pto (node, symconst_pto); @@ -296,11 +296,11 @@ void fake_main_args (ir_graph *graph) /* 'main' has signature 'void(int, char[]*[]*)' */ assert (NULL == args [2]); - assert (is_pointer_type (ctp)); + assert (is_Pointer_type (ctp)); ctp = get_pointer_points_to_type (ctp); /* ctp == char[]*[] */ - assert (is_array_type (ctp)); + assert (is_Array_type (ctp)); arg_desc = new_name (ctp, args [1], -1); arg_pto = new_pto (args [1]); @@ -315,11 +315,11 @@ void fake_main_args (ir_graph *graph) # ifdef TEST_MAIN_TYPE ctp = get_array_element_type (ctp); /* ctp == char[]* */ - assert (is_pointer_type (ctp)); + assert (is_Pointer_type (ctp)); ctp = get_pointer_points_to_type (ctp); /* ctp == char[] */ - assert (is_array_type (ctp)); + assert (is_Array_type (ctp)); ctp = get_array_element_type (ctp); /* ctp == char */ @@ -399,6 +399,9 @@ void pto_reset_graph_pto (ir_graph *graph, int ctx_idx) /* $Log$ + Revision 1.14 2005/01/05 14:25:54 beck + renames all is_x*_type() functions to is_X*_type() to prevent name clash with EDG fronten + Revision 1.13 2004/12/21 15:07:55 beck removed C99 contructs removed unnecessary allocation diff --git a/ir/ana2/pto_name.c b/ir/ana2/pto_name.c index e77f64ede..2724011f6 100644 --- a/ir/ana2/pto_name.c +++ b/ir/ana2/pto_name.c @@ -199,7 +199,7 @@ static int is_field (entity *ent) { type *tp = get_entity_type (ent); - if (is_primitive_type (tp) || is_pointer_type (tp)) { + if (is_Primitive_type (tp) || is_Pointer_type (tp)) { /* actually, we don't get by by restricting ourselves to pointer types */ return (TRUE); } else { @@ -338,7 +338,7 @@ static void pto_name_dump_desc (desc_t *desc, FILE *stream) for (i = 0; i < obj_desc->n_fields; i ++) { entity *field = obj_desc->fields [i]; - if (is_pointer_type (get_entity_type (field))) { + if (is_Pointer_type (get_entity_type (field))) { const char *ent_name = get_entity_name (field); fprintf (stream, "|<%i>%s", i, ent_name); @@ -470,13 +470,13 @@ desc_t *new_name (type *tp, ir_node *node, int ctx) { desc_t *desc = NULL; - assert ((is_class_type (tp) || is_array_type (tp)) && "unsuitable type"); + assert ((is_Class_type (tp) || is_Array_type (tp)) && "unsuitable type"); DBGPRINT (2, (stdout, "new_name(): new name for type \"%s\"\n", get_type_name (tp))); fflush (stdout); - if (is_class_type (tp)) { + if (is_Class_type (tp)) { obj_desc_t *obj_desc = NALLOC(sizeof(*obj_desc)); int i; int n_fields; @@ -496,7 +496,7 @@ desc_t *new_name (type *tp, ir_node *node, int ctx) } desc = (desc_t*) obj_desc; - } else if (is_array_type (tp)) { + } else if (is_Array_type (tp)) { arr_desc_t *arr_desc = (arr_desc_t*) NALLOC (sizeof (arr_desc_t)); arr_desc->kind = array; @@ -529,9 +529,9 @@ desc_t *new_ent_name (entity *ent) int missing = TRUE; type *tp = get_entity_type (ent); - assert (is_pointer_type (tp)); + assert (is_Pointer_type (tp)); tp = get_pointer_points_to_type (tp); - assert (is_class_type (tp)); + assert (is_Class_type (tp)); DBGPRINT (2, (stdout, "new_ent_name(): new name for entity \"%s\"\n", get_entity_name (ent))); @@ -649,6 +649,9 @@ void pto_name_cleanup (void) /* $Log$ + Revision 1.11 2005/01/05 14:25:54 beck + renames all is_x*_type() functions to is_X*_type() to prevent name clash with EDG fronten + Revision 1.10 2004/12/22 14:43:14 beck made allocations C-like diff --git a/ir/ana2/typalise.c b/ir/ana2/typalise.c index 02f7fe7ef..00109be23 100644 --- a/ir/ana2/typalise.c +++ b/ir/ana2/typalise.c @@ -57,7 +57,7 @@ static typalise_t *ta_exact (type *tp) ta->res.type = tp; ta->id = ta_id ++; - assert (is_class_type (tp)); + assert (is_Class_type (tp)); return (ta); } @@ -79,7 +79,7 @@ static typalise_t *ta_type (type *tp) ta->res.type = tp; ta->id = ta_id ++; - assert (is_class_type (tp)); + assert (is_Class_type (tp)); return (ta); } @@ -479,7 +479,7 @@ static typalise_t *typalise_proj (ir_node *proj) } else { /* ugh proj arg */ type *tp = get_method_param_type (get_entity_type (meth), n); - if (is_pointer_type (tp)) { + if (is_Pointer_type (tp)) { tp = get_pointer_points_to_type (tp); } @@ -553,10 +553,10 @@ typalise_t *typalise (ir_node *node) typalise_t *ta = NULL; type *tp = get_Cast_type (node); - if (is_pointer_type (tp)) { + if (is_Pointer_type (tp)) { tp = get_pointer_points_to_type (tp); } - assert (is_class_type (tp)); + assert (is_Class_type (tp)); ta = typalise (get_Cast_op (node)); @@ -595,24 +595,24 @@ typalise_t *typalise (ir_node *node) entity *ent = get_Sel_entity (node); type *tp = get_entity_type (ent); - if (is_method_type (tp)) { + if (is_Method_type (tp)) { tp = get_entity_type (ent); tp = get_method_res_type (tp, 0); - if (is_pointer_type (tp)) { + if (is_Pointer_type (tp)) { tp = get_pointer_points_to_type (tp); } res = ta_type (tp); - } else if (is_class_type (tp)) { + } else if (is_Class_type (tp)) { tp = get_entity_type (ent); - if (is_pointer_type (tp)) { + if (is_Pointer_type (tp)) { tp = get_pointer_points_to_type (tp); } res = ta_type (tp); - } else if (is_pointer_type (tp)) { + } else if (is_Pointer_type (tp)) { tp = get_pointer_points_to_type (tp); res = ta_type (tp); } else { @@ -676,7 +676,7 @@ typalise_t *typalise (ir_node *node) entity *ent = get_SymConst_entity (node); type *tp = get_entity_type (ent); tp = get_pointer_points_to_type (tp); - assert (is_class_type (tp)); + assert (is_Class_type (tp)); res = ta_type (tp); /* can't use ta_exact */ } else { @@ -706,6 +706,9 @@ typalise_t *typalise (ir_node *node) /* $Log$ + Revision 1.6 2005/01/05 14:25:54 beck + renames all is_x*_type() functions to is_X*_type() to prevent name clash with EDG fronten + Revision 1.5 2004/12/22 14:43:14 beck made allocations C-like