Changeset 320
- Timestamp:
- Jun 11, 2003, 8:14:40 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/emxomf/stabshll.c
-
Property cvs2svn:cvs-rev
changed from
1.8
to1.9
r319 r320 1106 1106 1107 1107 1108 /* Turn a struct into a class-struct to make icsdebug happy. 1109 Yeah, we could've done this on output too, but this is somewhat easier 1110 I belive. */ 1111 1112 static void struct_to_classstruct (struct type *tp) 1113 { 1114 struct type t, *t1, **list, **types; 1115 struct field *fields; 1116 int i, n; 1117 1118 n = tp->d.struc.count; 1119 if (n == 0) 1120 list = NULL; 1121 else 1122 { 1123 if (tp->d.struc.fields->tag != ty_fields 1124 || tp->d.struc.fields->d.fields.count != n) 1125 { 1126 warning ("Invalid struct field list"); 1127 return; 1128 } 1129 fields = tp->d.struc.fields->d.fields.list; 1130 if (tp->d.struc.types->tag != ty_types 1131 || tp->d.struc.types->d.types.count != n) 1132 { 1133 warning ("Invalid struct types list"); 1134 return; 1135 } 1136 types = tp->d.struc.types->d.types.list; 1137 list = xmalloc (n * sizeof (*list)); 1138 for (i = 0; i < n; ++i) 1139 { 1140 t.tag = ty_member; 1141 t.index = -1; 1142 t.d.member.type = types[i]; 1143 t.d.member.offset = fields[i].offset; 1144 t.d.member.flags = VIS_PUBLIC; 1145 t.d.member.name = fields[i].name; 1146 t.d.member.sname = NULL; 1147 list[i] = type_add (&t); 1148 } 1149 } 1150 1151 t.tag = ty_types; 1152 t.index = -1; 1153 t.d.types.count = n; 1154 t.d.types.list = list; 1155 t1 = type_add (&t); 1156 1157 t = *tp; 1158 tp->tag = ty_class; 1159 tp->d.class.members = t1; 1160 tp->d.class.size = t.d.struc.size; 1161 tp->d.class.count = t.d.struc.count; 1162 tp->d.class.name = t.d.struc.name; 1163 } 1164 1165 1108 1166 /* Build and return the internal representation of the `long long' 1109 1167 type. As IPMD doesn't know about `long long' we use the following … … 3332 3390 } 3333 3391 3392 /* hack/experiment to make icsdebug fancy our stuff. */ 3393 3394 if (cplusplus_flag) 3395 for (t1 = type_head; t1 != NULL; t1 = t1->next) 3396 if (t1->tag == ty_struc) 3397 struct_to_classstruct (t1); 3398 3399 3334 3400 /* Provide information about the compiler. */ 3335 3401 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.