mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-06 15:38:45 +08:00
Change how complex types are created
This patch changes how complex types are created. init_complex_type and arch_complex_type are unified, and complex types are reused, by attaching them to the underlying scalar type. gdb/ChangeLog 2020-04-01 Tom Tromey <tom@tromey.com> * stabsread.c (rs6000_builtin_type, read_sun_floating_type) (read_range_type): Update. * mdebugread.c (basic_type): Update. * go-lang.c (build_go_types): Use init_complex_type. * gdbtypes.h (struct main_type) <complex_type>: New member. (init_complex_type): Update. (arch_complex_type): Don't declare. * gdbtypes.c (init_complex_type): Remove "objfile" parameter. Make name if none given. Use alloc_type_copy. Look for cached complex type. (arch_complex_type): Remove. (gdbtypes_post_init): Use init_complex_type. * f-lang.c (build_fortran_types): Use init_complex_type. * dwarf2/read.c (read_base_type): Update. * d-lang.c (build_d_types): Use init_complex_type. * ctfread.c (read_base_type): Update.
This commit is contained in:
@ -665,11 +665,9 @@ build_go_types (struct gdbarch *gdbarch)
|
||||
builtin_go_type->builtin_float64
|
||||
= arch_float_type (gdbarch, 64, "float64", floatformats_ieee_double);
|
||||
builtin_go_type->builtin_complex64
|
||||
= arch_complex_type (gdbarch, "complex64",
|
||||
builtin_go_type->builtin_float32);
|
||||
= init_complex_type ("complex64", builtin_go_type->builtin_float32);
|
||||
builtin_go_type->builtin_complex128
|
||||
= arch_complex_type (gdbarch, "complex128",
|
||||
builtin_go_type->builtin_float64);
|
||||
= init_complex_type ("complex128", builtin_go_type->builtin_float64);
|
||||
|
||||
return builtin_go_type;
|
||||
}
|
||||
|
Reference in New Issue
Block a user