GDB's parser used to do. */
if (target_type == NULL)
{
- if (TYPE_OBJFILE_OWNED (type))
+ if (type->is_objfile_owned ())
target_type = objfile_type (type->objfile ())->builtin_int;
else
target_type = builtin_type (type->arch ())->builtin_int;
built-in parser does. For now, assume "int" like GDB's
built-in parser used to do, but at least warn. */
struct type *fallback;
- if (TYPE_OBJFILE_OWNED (type))
+ if (type->is_objfile_owned ())
fallback = objfile_type (type->objfile ())->builtin_int;
else
fallback = builtin_type (type->arch ())->builtin_int;
struct type *
alloc_type_copy (const struct type *type)
{
- if (TYPE_OBJFILE_OWNED (type))
+ if (type->is_objfile_owned ())
return alloc_type (type->objfile ());
else
return alloc_type_arch (type->arch ());
{
struct gdbarch *arch;
- if (TYPE_OBJFILE_OWNED (type))
+ if (type->is_objfile_owned ())
arch = type->objfile ()->arch ();
else
arch = type->arch ();
/* Allocate the structure. */
- if (! TYPE_OBJFILE_OWNED (oldtype))
+ if (!oldtype->is_objfile_owned ())
type = GDBARCH_OBSTACK_ZALLOC (get_type_arch (oldtype), struct type);
else
type = OBSTACK_ZALLOC (&TYPE_OBJFILE (oldtype)->objfile_obstack,
struct type *index_type;
struct type *range_type;
- if (TYPE_OBJFILE_OWNED (element_type))
+ if (element_type->is_objfile_owned ())
index_type = objfile_type (element_type->objfile ())->builtin_int;
else
index_type = builtin_type (element_type->arch ())->builtin_int;
{
struct dynamic_prop_list *temp;
- gdb_assert (TYPE_OBJFILE_OWNED (this));
+ gdb_assert (this->is_objfile_owned ());
temp = XOBNEW (&TYPE_OBJFILE (this)->objfile_obstack,
struct dynamic_prop_list);
puts_filtered ("\n");
printf_filtered ("%*slength %s\n", spaces, "",
pulongest (TYPE_LENGTH (type)));
- if (TYPE_OBJFILE_OWNED (type))
+ if (type->is_objfile_owned ())
{
printf_filtered ("%*sobjfile ", spaces, "");
gdb_print_host_address (type->objfile (), gdb_stdout);
void **slot;
struct type *new_type;
- if (! TYPE_OBJFILE_OWNED (type))
+ if (!type->is_objfile_owned ())
return type;
/* This type shouldn't be pointing to any types in other objfiles;
{
struct type *new_type;
- gdb_assert (TYPE_OBJFILE_OWNED (type));
+ gdb_assert (type->is_objfile_owned ());
new_type = alloc_type_copy (type);
new_type->set_instance_flags (type->instance_flags ());
std::unique_ptr<fixed_point_type_info> up (new fixed_point_type_info);
fixed_point_type_info *info;
- if (TYPE_OBJFILE_OWNED (type))
+ if (type->is_objfile_owned ())
{
fixed_point_type_storage *storage
= fixed_point_objfile_key.get (TYPE_OBJFILE (type));
the objfile retrieved as TYPE_OBJFILE. Otherwise, the type is
owned by an architecture; TYPE_OBJFILE is NULL in this case. */
-#define TYPE_OBJFILE_OWNED(t) ((t)->is_objfile_owned ())
#define TYPE_OBJFILE(t) ((t)->objfile ())
/* * True if this type was declared using the "class" keyword. This is
when it is no longer needed. */
#define TYPE_ALLOC(t,size) \
- (obstack_alloc ((TYPE_OBJFILE_OWNED (t) \
+ (obstack_alloc (((t)->is_objfile_owned () \
? &((t)->objfile ()->objfile_obstack) \
: gdbarch_obstack ((t)->arch ())), \
size))