// it has a name, which is the typedef name.
if (get_is_anonymous())
{
- if (internal)
+ if (internal && !get_name().empty())
return cl + get_type_name(this, qualified_name, /*internal=*/true);
return get_class_or_union_flat_representation(this, "",
/*one_line=*/true,
string repr;
if (get_is_anonymous())
{
- if (internal)
+ if (internal && !get_name().empty())
repr = string("union ") +
get_type_name(this, qualified_name, /*internal=*/true);
else
<var-decl name='' type-id='type-id-2' visibility='default'/>
</data-member>
</class-decl>
- <class-decl name='' size-in-bits='64' alignment-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' id='type-id-3'>
+ <class-decl name='' size-in-bits='32' alignment-in-bits='32' is-struct='yes' is-anonymous='yes' visibility='default' id='type-id-3'>
<data-member access='public' layout-offset-in-bits='0'>
- <var-decl name='y' type-id='type-id-4' visibility='default'/>
+ <var-decl name='x' type-id='type-id-4' visibility='default'/>
</data-member>
</class-decl>
- <class-decl name='' size-in-bits='32' alignment-in-bits='32' is-struct='yes' is-anonymous='yes' visibility='default' id='type-id-5'>
+ <class-decl name='' size-in-bits='64' alignment-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' id='type-id-5'>
<data-member access='public' layout-offset-in-bits='0'>
- <var-decl name='x' type-id='type-id-6' visibility='default'/>
+ <var-decl name='y' type-id='type-id-6' visibility='default'/>
</data-member>
</class-decl>
- <type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-6'/>
- <type-decl name='long int' size-in-bits='64' alignment-in-bits='64' id='type-id-4'/>
+ <type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-4'/>
+ <type-decl name='long int' size-in-bits='64' alignment-in-bits='64' id='type-id-6'/>
<union-decl name='' size-in-bits='64' is-anonymous='yes' visibility='default' id='type-id-2'>
<data-member access='public'>
- <var-decl name='' type-id='type-id-5' visibility='default'/>
+ <var-decl name='' type-id='type-id-3' visibility='default'/>
</data-member>
<data-member access='public'>
- <var-decl name='' type-id='type-id-3' visibility='default'/>
+ <var-decl name='' type-id='type-id-5' visibility='default'/>
</data-member>
</union-decl>
<pointer-type-def type-id='type-id-1' size-in-bits='64' alignment-in-bits='64' id='type-id-7'/>
<elf-symbol name='fun' type='func-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
</elf-function-symbols>
<abi-instr address-size='64' language='LANG_C'>
- <class-decl name='' size-in-bits='64' alignment-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' id='type-id-1'>
+ <class-decl name='' size-in-bits='32' alignment-in-bits='32' is-struct='yes' is-anonymous='yes' visibility='default' id='type-id-1'>
<data-member access='public' layout-offset-in-bits='0'>
- <var-decl name='y' type-id='type-id-2' visibility='default'/>
+ <var-decl name='x' type-id='type-id-2' visibility='default'/>
</data-member>
</class-decl>
- <class-decl name='' size-in-bits='32' alignment-in-bits='32' is-struct='yes' is-anonymous='yes' visibility='default' id='type-id-3'>
+ <class-decl name='' size-in-bits='64' alignment-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' id='type-id-3'>
<data-member access='public' layout-offset-in-bits='0'>
- <var-decl name='x' type-id='type-id-4' visibility='default'/>
+ <var-decl name='y' type-id='type-id-4' visibility='default'/>
</data-member>
</class-decl>
- <type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-4'/>
- <type-decl name='long int' size-in-bits='64' alignment-in-bits='64' id='type-id-2'/>
+ <type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-2'/>
+ <type-decl name='long int' size-in-bits='64' alignment-in-bits='64' id='type-id-4'/>
<union-decl name='A' size-in-bits='64' visibility='default' id='type-id-5'>
<data-member access='public'>
- <var-decl name='' type-id='type-id-3' visibility='default'/>
+ <var-decl name='' type-id='type-id-1' visibility='default'/>
</data-member>
<data-member access='public'>
- <var-decl name='' type-id='type-id-1' visibility='default'/>
+ <var-decl name='' type-id='type-id-3' visibility='default'/>
</data-member>
</union-decl>
<pointer-type-def type-id='type-id-5' size-in-bits='64' alignment-in-bits='64' id='type-id-6'/>
<elf-symbol name='t' size='8' type='object-type' binding='global-binding' visibility='default-visibility' is-defined='yes'/>
</elf-variable-symbols>
<abi-instr address-size='64' language='LANG_C'>
- <class-decl name='' size-in-bits='32' alignment-in-bits='32' is-struct='yes' is-anonymous='yes' visibility='default' id='type-id-1'>
+ <class-decl name='uprobe_task' size-in-bits='64' alignment-in-bits='64' is-struct='yes' visibility='default' id='type-id-1'>
<data-member access='public' layout-offset-in-bits='0'>
- <var-decl name='dup_xol_work' type-id='type-id-2' visibility='default'/>
+ <var-decl name='' type-id='type-id-2' visibility='default'/>
</data-member>
</class-decl>
- <class-decl name='' size-in-bits='64' alignment-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' id='type-id-3'>
+ <class-decl name='' size-in-bits='32' alignment-in-bits='32' is-struct='yes' is-anonymous='yes' visibility='default' id='type-id-3'>
<data-member access='public' layout-offset-in-bits='0'>
- <var-decl name='vaddr' type-id='type-id-4' visibility='default'/>
+ <var-decl name='dup_xol_work' type-id='type-id-4' visibility='default'/>
</data-member>
</class-decl>
- <class-decl name='uprobe_task' size-in-bits='64' alignment-in-bits='64' is-struct='yes' visibility='default' id='type-id-5'>
+ <class-decl name='' size-in-bits='64' alignment-in-bits='64' is-struct='yes' is-anonymous='yes' visibility='default' id='type-id-5'>
<data-member access='public' layout-offset-in-bits='0'>
- <var-decl name='' type-id='type-id-6' visibility='default'/>
+ <var-decl name='vaddr' type-id='type-id-6' visibility='default'/>
</data-member>
</class-decl>
- <type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-2'/>
- <union-decl name='' size-in-bits='64' is-anonymous='yes' visibility='default' id='type-id-6'>
+ <type-decl name='int' size-in-bits='32' alignment-in-bits='32' id='type-id-4'/>
+ <union-decl name='' size-in-bits='64' is-anonymous='yes' visibility='default' id='type-id-2'>
<data-member access='public'>
- <var-decl name='' type-id='type-id-3' visibility='default'/>
+ <var-decl name='' type-id='type-id-5' visibility='default'/>
</data-member>
<data-member access='public'>
- <var-decl name='' type-id='type-id-1' visibility='default'/>
+ <var-decl name='' type-id='type-id-3' visibility='default'/>
</data-member>
</union-decl>
- <type-decl name='unsigned long int' size-in-bits='64' alignment-in-bits='64' id='type-id-4'/>
- <var-decl name='t' type-id='type-id-5' mangled-name='t' visibility='default' elf-symbol-id='t'/>
+ <type-decl name='unsigned long int' size-in-bits='64' alignment-in-bits='64' id='type-id-6'/>
+ <var-decl name='t' type-id='type-id-1' mangled-name='t' visibility='default' elf-symbol-id='t'/>
</abi-instr>
</abi-corpus>
<var-decl name='m0' type-id='95e97e5e' visibility='default'/>
</data-member>
</class-decl>
- <class-decl name='' size-in-bits='32' alignment-in-bits='8' is-struct='yes' is-anonymous='yes' visibility='default' id='e7f43f72'>
+ <class-decl name='' size-in-bits='32' alignment-in-bits='8' is-struct='yes' is-anonymous='yes' visibility='default' id='b91ffdee'>
<data-member access='public' layout-offset-in-bits='0'>
<var-decl name='status0' type-id='811c9dc5' visibility='default'/>
</data-member>
<pointer-type-def type-id='bd54fe1a' size-in-bits='64' alignment-in-bits='64' id='3ccc2590'/>
<qualified-type-def type-id='3ccc2590' restrict='yes' id='af4b1b38'/>
<qualified-type-def type-id='a2185560' volatile='yes' id='ec67e496'/>
- <var-decl name='status' type-id='e7f43f72' mangled-name='status' visibility='default' elf-symbol-id='status'/>
+ <var-decl name='status' type-id='b91ffdee' mangled-name='status' visibility='default' elf-symbol-id='status'/>
<var-decl name='test_pointer' type-id='26a90f95' mangled-name='test_pointer' visibility='default' elf-symbol-id='test_pointer'/>
<var-decl name='test_const' type-id='0fb3b55d' mangled-name='test_const' visibility='default' elf-symbol-id='test_const'/>
<var-decl name='test_float' type-id='a6c45d85' mangled-name='test_float' visibility='default' elf-symbol-id='test_float'/>