is_lowered_type is now only used in asserts
authorAndreas Zwinkau <zwinkau@kit.edu>
Wed, 20 Apr 2011 11:01:37 +0000 (13:01 +0200)
committerAndreas Zwinkau <zwinkau@kit.edu>
Wed, 20 Apr 2011 11:01:37 +0000 (13:01 +0200)
ir/be/bestabs.c
ir/lower/lower_calls.c

index 265882f..66babf2 100644 (file)
@@ -699,8 +699,8 @@ static void stabs_method_begin(dbg_handle *handle, const ir_entity *ent)
 
        /* create the method entry */
        mtp = get_entity_type(ent);
-       if (is_lowered_type(mtp))
-               mtp = get_associated_type(mtp);
+       assert (is_lowered_type(mtp));
+       mtp = get_associated_type(mtp);
        if (get_method_n_ress(mtp) > 0)
                rtp = get_method_res_type(mtp, 0);
        else
index d3b6a5d..37c4de1 100644 (file)
@@ -84,10 +84,7 @@ static ir_type *create_modified_mtd_type(const lower_params_t *lp, ir_type *mtp)
        int        changed = 0;
        ir_variadicity var;
 
-       if (is_lowered_type(mtp)) {
-               /* the type is already lowered. Not handled yet. */
-               assert(0 && "lowered types NYI");
-       }
+       assert(!is_lowered_type(mtp) && "lowered types not yet implemented");
 
        lowered = get_associated_type(mtp);
        if (lowered != NULL)
@@ -515,8 +512,8 @@ static void add_hidden_param(ir_graph *irg, size_t n_com, ir_node **ins, cl_entr
                size_t   i;
                size_t   j;
 
-               if (is_lowered_type(ctp))
-                       ctp = get_associated_type(ctp);
+               assert (is_lowered_type(ctp));
+               ctp = get_associated_type(ctp);
 
                for (j = i = 0; i < get_method_n_ress(ctp); ++i) {
                        ir_type *rtp = get_method_res_type(ctp, i);