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