diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-05-14 13:45:40 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-14 13:45:40 -0400 |
commit | 67607e24d0413828acdfa9bc38f6fbac40b860b9 (patch) | |
tree | 244fb4d92616ef31b9b22197d5a90df09e0147b2 /gdb/rust-lang.c | |
parent | 02eba61aa6cad683e96cf13f483adc04982c0c2b (diff) | |
download | fsf-binutils-gdb-67607e24d0413828acdfa9bc38f6fbac40b860b9.zip fsf-binutils-gdb-67607e24d0413828acdfa9bc38f6fbac40b860b9.tar.gz fsf-binutils-gdb-67607e24d0413828acdfa9bc38f6fbac40b860b9.tar.bz2 |
gdb: add type::code / type::set_code
Add the code and set_code methods on code, in order to remove the
TYPE_CODE macro. In this patch, the TYPE_CODE macro is changed to use
type::code, so all the call sites that are used to set the type code are
changed to use type::set_code. The next patch will remove TYPE_CODE
completely.
gdb/ChangeLog:
* gdbtypes.h (struct type) <code, set_code>: New methods.
(TYPE_CODE): Use type::code. Change all call sites used to set
the code to use type::set_code instead.
Diffstat (limited to 'gdb/rust-lang.c')
-rw-r--r-- | gdb/rust-lang.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c index f2fb011..eb0ea1b 100644 --- a/gdb/rust-lang.c +++ b/gdb/rust-lang.c @@ -981,7 +981,7 @@ rust_composite_type (struct type *original, if (field2 != NULL) ++nfields; - TYPE_CODE (result) = TYPE_CODE_STRUCT; + result->set_code (TYPE_CODE_STRUCT); TYPE_NAME (result) = name; TYPE_NFIELDS (result) = nfields; |