[DWARVES_REORGANIZE]: Add a sanity check on class__demote_bitfields

In fact a BRAIN FART ALERT! 8-)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2007-11-20 17:55:18 -02:00
parent 390e2c64f4
commit 80d6e56e1d
1 changed files with 6 additions and 0 deletions

View File

@ -451,6 +451,12 @@ static int class__demote_bitfields(struct class *class, const struct cu *cu,
old_type_tag = cu__find_tag_by_id(cu, member->tag.type);
new_type_tag = cu__find_base_type_of_size(cu, bytes_needed);
if (new_type_tag == NULL) {
fprintf(fp, "/* BRAIN FART ALERT! couldn't find a "
"%zd bytes base type */\n\n", bytes_needed);
continue;
}
if (verbose)
fprintf(fp, "/* Demoting bitfield ('%s' ... '%s') "
"from '%s' to '%s' */\n",