if (map_bt[bt])
return map_bt[bt];
+ type_allocator alloc (objfile);
+
switch (bt)
{
case btNil:
break;
case btFloatDec:
- tp = init_type (objfile, TYPE_CODE_ERROR,
- gdbarch_double_bit (gdbarch), "floating decimal");
+ tp = alloc.new_type (TYPE_CODE_ERROR,
+ gdbarch_double_bit (gdbarch), "floating decimal");
break;
case btString:
/* Is a "string" the way btString means it the same as TYPE_CODE_STRING?
FIXME. */
- tp = init_type (objfile, TYPE_CODE_STRING, TARGET_CHAR_BIT, "string");
+ tp = alloc.new_type (TYPE_CODE_STRING, TARGET_CHAR_BIT, "string");
break;
case btVoid:
}
}
+ type_allocator alloc (mdebugread_objfile);
+
/* Move on to next aux. */
ax++;
/* Try to cross reference this type, build new type on failure. */
ax += cross_ref (fd, ax, &tp, type_code, &name, bigend, sym_name);
if (tp == NULL)
- tp = init_type (mdebugread_objfile, type_code, 0, NULL);
+ tp = alloc.new_type (type_code, 0, NULL);
/* DEC c89 produces cross references to qualified aggregate types,
dereference them. */
/* Try to cross reference this type, build new type on failure. */
ax += cross_ref (fd, ax, &tp, type_code, &name, bigend, sym_name);
if (tp == NULL)
- tp = init_type (mdebugread_objfile, type_code, 0, NULL);
+ tp = alloc.new_type (type_code, 0, NULL);
/* Make sure that TYPE_CODE(tp) has an expected type code.
Any type may be returned from cross_ref if file indirect entries
rf = rn->rfd;
}
+ type_allocator alloc (mdebugread_objfile);
+
/* mips cc uses a rf of -1 for opaque struct definitions.
Set TYPE_STUB for these types so that check_typedef will
resolve them if the struct gets defined in another compilation unit. */
if (rf == -1)
{
*pname = "<undefined>";
- *tpp = init_type (mdebugread_objfile, type_code, 0, NULL);
+ *tpp = alloc.new_type (type_code, 0, NULL);
(*tpp)->set_is_stub (true);
return result;
}
switch (tir.bt)
{
case btVoid:
- *tpp = init_type (mdebugread_objfile, type_code, 0, NULL);
+ *tpp = alloc.new_type (type_code, 0, NULL);
*pname = "<undefined>";
break;
default:
complaint (_("illegal bt %d in forward typedef for %s"), tir.bt,
sym_name);
- *tpp = init_type (mdebugread_objfile, type_code, 0, NULL);
+ *tpp = alloc.new_type (type_code, 0, NULL);
break;
}
return result;
has not been parsed yet.
Initialize the type only, it will be filled in when
it's definition is parsed. */
- *tpp = init_type (mdebugread_objfile, type_code, 0, NULL);
+ *tpp = alloc.new_type (type_code, 0, NULL);
}
add_pending (fh, esh, *tpp);
}