* gdbtypes.h (make_function_type): Remove OBJFILE parameter.

* gdbtypes.c (make_function_type): Remove OBJFILE parameter.
	(lookup_function_type): Update call.
	* stabsread.c (read_type): Likewise.
	* dwarf2read.c (read_subroutine_type): Use lookup_function_type
	instead of make_function_type.
	* jv-lang.c (type_from_class): Likewise.  Do not allocate types
	on the fake "dynamics" obstack.
This commit is contained in:
Ulrich Weigand
2009-06-29 13:19:19 +00:00
parent 46bf50512c
commit 0c8b41f1c6
6 changed files with 26 additions and 14 deletions

View File

@ -378,24 +378,24 @@ lookup_reference_type (struct type *type)
/* Lookup a function type that returns type TYPE. TYPEPTR, if
nonzero, points to a pointer to memory where the function type
should be stored. If *TYPEPTR is zero, update it to point to the
function type we return. We allocate new memory from OBJFILE if needed; use
NULL for permanent types. */
function type we return. We allocate new memory if needed. */
struct type *
make_function_type (struct type *type, struct type **typeptr,
struct objfile *objfile)
make_function_type (struct type *type, struct type **typeptr)
{
struct type *ntype; /* New type */
struct objfile *objfile;
if (typeptr == 0 || *typeptr == 0) /* We'll need to allocate one. */
{
ntype = alloc_type (objfile);
ntype = alloc_type (TYPE_OBJFILE (type));
if (typeptr)
*typeptr = ntype;
}
else /* We have storage, but need to reset it. */
{
ntype = *typeptr;
objfile = TYPE_OBJFILE (ntype);
smash_type (ntype);
TYPE_OBJFILE (ntype) = objfile;
}
@ -415,7 +415,7 @@ make_function_type (struct type *type, struct type **typeptr,
struct type *
lookup_function_type (struct type *type)
{
return make_function_type (type, (struct type **) 0, TYPE_OBJFILE (type));
return make_function_type (type, (struct type **) 0);
}
/* Identify address space identifier by name --