| 191 | } |
| 192 | |
| 193 | static bool type_defined(const struct cdump_type *t) |
| 194 | { |
| 195 | switch (t->kind) { |
| 196 | case CDUMP_STRUCT: |
| 197 | case CDUMP_UNION: |
| 198 | return (t->u.members != NULL); |
| 199 | case CDUMP_ENUM: |
| 200 | return (t->u.enum_vals != NULL); |
| 201 | |
| 202 | /* These shouldn't happen; we don't try to define them. */ |
| 203 | case CDUMP_UNKNOWN: |
| 204 | case CDUMP_ARRAY: |
| 205 | case CDUMP_POINTER: |
| 206 | break; |
| 207 | } |
| 208 | abort(); |
| 209 | } |
| 210 | |
| 211 | /* May allocate a new type if not already found (steals @name) */ |
| 212 | static struct cdump_type *get_type(struct cdump_definitions *defs, |
no test coverage detected