Use XVS field type instead of doing a parallel lookup.
* ada-lang.c (ada_get_base_type): Follow the XVS field type if it is a reference type instead of doing a type lookup using the XVS field name.
This commit is contained in:
parent
5bf03f1387
commit
f80d3ff275
2 changed files with 21 additions and 5 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2010-01-18 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
|
Use XVS field type instead of doing a parallel lookup.
|
||||||
|
* ada-lang.c (ada_get_base_type): Follow the XVS field type
|
||||||
|
if it is a reference type instead of doing a type lookup using
|
||||||
|
the XVS field name.
|
||||||
|
|
||||||
2010-01-18 Joel Brobecker <brobecker@adacore.com>
|
2010-01-18 Joel Brobecker <brobecker@adacore.com>
|
||||||
|
|
||||||
Trust PAD types instead of using PAD___XVS.
|
Trust PAD types instead of using PAD___XVS.
|
||||||
|
|
|
@ -7788,11 +7788,20 @@ ada_get_base_type (struct type *raw_type)
|
||||||
|| TYPE_NFIELDS (real_type_namer) != 1)
|
|| TYPE_NFIELDS (real_type_namer) != 1)
|
||||||
return raw_type;
|
return raw_type;
|
||||||
|
|
||||||
raw_real_type = ada_find_any_type (TYPE_FIELD_NAME (real_type_namer, 0));
|
if (TYPE_CODE (TYPE_FIELD_TYPE (real_type_namer, 0)) != TYPE_CODE_REF)
|
||||||
if (raw_real_type == NULL)
|
{
|
||||||
return raw_type;
|
/* This is an older encoding form where the base type needs to be
|
||||||
else
|
looked up by name. We prefer the newer enconding because it is
|
||||||
return raw_real_type;
|
more efficient. */
|
||||||
|
raw_real_type = ada_find_any_type (TYPE_FIELD_NAME (real_type_namer, 0));
|
||||||
|
if (raw_real_type == NULL)
|
||||||
|
return raw_type;
|
||||||
|
else
|
||||||
|
return raw_real_type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The field in our XVS type is a reference to the base type. */
|
||||||
|
return TYPE_TARGET_TYPE (TYPE_FIELD_TYPE (real_type_namer, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The type of value designated by TYPE, with all aligners removed. */
|
/* The type of value designated by TYPE, with all aligners removed. */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue