Gammelfix.
[libfirm] / ir / tr / entity.c
index 541fd26..da62e15 100644 (file)
@@ -170,7 +170,6 @@ new_rd_entity(dbg_info *db, ir_type *owner, ident *name, ir_type *type)
                res->attr.mtd_attr.param_access       = NULL;
                res->attr.mtd_attr.param_weight       = NULL;
                res->attr.mtd_attr.irg                = NULL;
-               res->attr.mtd_attr.section            = section_text;
        } else if (is_compound_type(type)) {
                res->variability = variability_uninitialized;
                res->value       = NULL;
@@ -910,6 +909,7 @@ set_compound_ent_value_w_path(ir_entity *ent, ir_node *val, compound_graph_path
 
 int
 get_compound_ent_n_values(ir_entity *ent) {
+       assert(!ent->has_initializer);
        assert(is_compound_entity(ent) && (ent->variability != variability_uninitialized));
        return ARR_LEN(ent->attr.cmpd_attr.values);
 }  /* get_compound_ent_n_values */
@@ -917,6 +917,7 @@ get_compound_ent_n_values(ir_entity *ent) {
 ir_node *
 get_compound_ent_value(ir_entity *ent, int pos) {
        assert(is_compound_entity(ent) && (ent->variability != variability_uninitialized));
+       assert(!ent->has_initializer);
        assert(0 <= pos && pos < ARR_LEN(ent->attr.cmpd_attr.values));
        return ent->attr.cmpd_attr.values[pos];
 }  /* get_compound_ent_value */
@@ -924,6 +925,7 @@ get_compound_ent_value(ir_entity *ent, int pos) {
 compound_graph_path *
 get_compound_ent_value_path(ir_entity *ent, int pos) {
        assert(is_compound_entity(ent) && (ent->variability != variability_uninitialized));
+       assert(!ent->has_initializer);
        assert(0 <= pos && pos < ARR_LEN(ent->attr.cmpd_attr.val_paths));
        return ent->attr.cmpd_attr.val_paths[pos];
 }  /* get_compound_ent_value_path */
@@ -1331,18 +1333,6 @@ void set_entity_vtable_number(ir_entity *ent, unsigned vtable_number) {
        ent->attr.mtd_attr.vtable_number = vtable_number;
 }  /* set_entity_vtable_number */
 
-/* Returns the section of a method. */
-ir_img_section get_method_img_section(const ir_entity *ent) {
-       assert(is_method_entity((ir_entity *)ent));
-       return ent->attr.mtd_attr.section;
-}  /* get_method_img_section */
-
-/* Sets the section of a method. */
-void set_method_img_section(ir_entity *ent, ir_img_section section) {
-       assert(is_method_entity(ent));
-       ent->attr.mtd_attr.section = section;
-}  /* set_method_img_section */
-
 int
 (is_entity)(const void *thing) {
        return _is_entity(thing);