diff options
author | Artemiy Volkov <artemiyv@acm.org> | 2017-03-20 13:47:39 -0700 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2017-03-20 13:47:39 -0700 |
commit | 3b22433085e4cfee83f5c52f3baa8fb9bc67f8dd (patch) | |
tree | 13cf13318a14f0d8981705445f9f21cf40c0324a /gdb/guile | |
parent | f9aeb8d499fa12610610dc19618230304c698f6c (diff) | |
download | gdb-3b22433085e4cfee83f5c52f3baa8fb9bc67f8dd.zip gdb-3b22433085e4cfee83f5c52f3baa8fb9bc67f8dd.tar.gz gdb-3b22433085e4cfee83f5c52f3baa8fb9bc67f8dd.tar.bz2 |
Change {lookup,make}_reference_type API
Parameterize lookup_reference_type() and make_reference_type() by the kind of
reference type we want to look up. Create two wrapper functions
lookup_{lvalue,rvalue}_reference_type() for lookup_reference_type() to simplify
the API. Change all callers to use the new API.
gdb/Changelog
PR gdb/14441
* dwarf2read.c (read_tag_reference_type): Use
lookup_lvalue_reference_type() instead of lookup_reference_type().
* eval.c (evaluate_subexp_standard): Likewise.
* f-exp.y: Likewise.
* gdbtypes.c (make_reference_type, lookup_reference_type):
Generalize with rvalue reference types.
(lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
convenience wrappers for lookup_reference_type().
* gdbtypes.h (make_reference_type, lookup_reference_type): Add a
reference kind parameter.
(lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
wrappers for lookup_reference_type().
* guile/scm-type.c (gdbscm_type_reference): Use
lookup_lvalue_reference_type() instead of lookup_reference_type().
* guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
* parse.c (follow_types): Likewise.
* python/py-type.c (typy_reference, typy_lookup_type): Likewise.
* python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
Likewise.
* python/py-xmethods.c (gdbpy_get_xmethod_result_type)
(gdbpy_invoke_xmethod): Likewise.
* stabsread.c: Provide extra argument to make_reference_type()
call.
* valops.c (value_ref, value_rtti_indirect_type): Use
lookup_lvalue_reference_type() instead of lookup_reference_type().
Diffstat (limited to 'gdb/guile')
-rw-r--r-- | gdb/guile/scm-type.c | 2 | ||||
-rw-r--r-- | gdb/guile/scm-value.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c index b3036ad..704be88 100644 --- a/gdb/guile/scm-type.c +++ b/gdb/guile/scm-type.c @@ -845,7 +845,7 @@ gdbscm_type_reference (SCM self) TRY { - type = lookup_reference_type (type); + type = lookup_lvalue_reference_type (type); } CATCH (except, RETURN_MASK_ALL) { diff --git a/gdb/guile/scm-value.c b/gdb/guile/scm-value.c index f81a90c..f631032 100644 --- a/gdb/guile/scm-value.c +++ b/gdb/guile/scm-value.c @@ -591,7 +591,7 @@ gdbscm_value_dynamic_type (SCM self) if (was_pointer) type = lookup_pointer_type (type); else - type = lookup_reference_type (type); + type = lookup_lvalue_reference_type (type); } } else if (TYPE_CODE (type) == TYPE_CODE_STRUCT) |