Reuse existing builtin types

This changes a few spots to reuse the existing builting "void" type,
rather than construct a new one.

Reviewed-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
Tom Tromey
2023-03-13 09:31:13 -06:00
parent 8a17bdd9cc
commit 95751990e4
5 changed files with 5 additions and 11 deletions

View File

@@ -941,7 +941,7 @@ public:
add (arch_integer_type (gdbarch, gdbarch_ptr_bit (gdbarch), 0, "ptrdiff_t"));
add (arch_integer_type (gdbarch, gdbarch_ptr_bit (gdbarch), 0, "intptr_t"));
add (arch_integer_type (gdbarch, gdbarch_ptr_bit (gdbarch), 1, "uintptr_t"));
add (arch_type (gdbarch, TYPE_CODE_VOID, TARGET_CHAR_BIT, "void"));
add (builtin_type (gdbarch)->builtin_void);
/* Type of elements of strings. */
lai->set_string_char_type (char_type);