Change pointer_type to a method of struct type
authorTom Tromey <tom@tromey.com>
Sat, 11 Sep 2021 19:58:04 +0000 (13:58 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 23 Sep 2021 21:11:00 +0000 (15:11 -0600)
commit809f3be12c0621cbf071c585da5638f6841c38b1
treec0a9beeebaf38da9fb3a3e7447f4cb18a624479f
parent0086a91ceef5207463a10c875ed85c40eb066722
Change pointer_type to a method of struct type

I noticed that pointer_type is declared in language.h and defined in
language.c.  However, it really has to do with types, so it should
have been in gdbtypes.h all along.

This patch changes it to be a method on struct type.  And, I went
through uses of TYPE_IS_REFERENCE and updated many spots to use the
new method as well.  (I didn't update ones that were in arch-specific
code, as I couldn't readily test that.)
17 files changed:
gdb/ax-gdb.c
gdb/c-valprint.c
gdb/c-varobj.c
gdb/completer.c
gdb/cp-support.c
gdb/eval.c
gdb/findvar.c
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/language.c
gdb/language.h
gdb/python/py-type.c
gdb/python/py-value.c
gdb/symtab.c
gdb/typeprint.c
gdb/valops.c
gdb/value.c