diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-05-14 13:46:38 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-05-14 13:46:38 -0400 |
commit | 7813437494ac39f3aef392d06ed5416e84fe386b (patch) | |
tree | 15290bf5b2bd9d23c59103a6a42b99adc0111d6d /gdb/python/py-xmethods.c | |
parent | 67607e24d0413828acdfa9bc38f6fbac40b860b9 (diff) | |
download | binutils-7813437494ac39f3aef392d06ed5416e84fe386b.zip binutils-7813437494ac39f3aef392d06ed5416e84fe386b.tar.gz binutils-7813437494ac39f3aef392d06ed5416e84fe386b.tar.bz2 |
gdb: remove TYPE_CODE macro
Remove TYPE_CODE, changing all the call sites to use type::code
directly. This is quite a big diff, but this was mostly done using sed
and coccinelle. A few call sites were done by hand.
gdb/ChangeLog:
* gdbtypes.h (TYPE_CODE): Remove. Change all call sites to use
type::code instead.
Diffstat (limited to 'gdb/python/py-xmethods.c')
-rw-r--r-- | gdb/python/py-xmethods.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/python/py-xmethods.c b/gdb/python/py-xmethods.c index 274d1bf..d223d49 100644 --- a/gdb/python/py-xmethods.c +++ b/gdb/python/py-xmethods.c @@ -425,7 +425,7 @@ python_xmethod_worker::do_get_result_type (value *obj, obj_type = check_typedef (value_type (obj)); this_type = check_typedef (type_object_to_type (m_this_type)); - if (TYPE_CODE (obj_type) == TYPE_CODE_PTR) + if (obj_type->code () == TYPE_CODE_PTR) { struct type *this_ptr = lookup_pointer_type (this_type); @@ -435,7 +435,7 @@ python_xmethod_worker::do_get_result_type (value *obj, else if (TYPE_IS_REFERENCE (obj_type)) { struct type *this_ref - = lookup_reference_type (this_type, TYPE_CODE (obj_type)); + = lookup_reference_type (this_type, obj_type->code ()); if (!types_equal (obj_type, this_ref)) obj = value_cast (this_ref, obj); @@ -510,7 +510,7 @@ python_xmethod_worker::invoke (struct value *obj, obj_type = check_typedef (value_type (obj)); this_type = check_typedef (type_object_to_type (m_this_type)); - if (TYPE_CODE (obj_type) == TYPE_CODE_PTR) + if (obj_type->code () == TYPE_CODE_PTR) { struct type *this_ptr = lookup_pointer_type (this_type); @@ -520,7 +520,7 @@ python_xmethod_worker::invoke (struct value *obj, else if (TYPE_IS_REFERENCE (obj_type)) { struct type *this_ref - = lookup_reference_type (this_type, TYPE_CODE (obj_type)); + = lookup_reference_type (this_type, obj_type->code ()); if (!types_equal (obj_type, this_ref)) obj = value_cast (this_ref, obj); |