summaryrefslogtreecommitdiff
path: root/backends/s390_retval.c
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2023-02-13 17:45:50 +0100
committerMark Wielaard <mark@klomp.org>2023-02-14 15:12:48 +0100
commita4fafb7722c9950dacd5689f1ce8e31f8fa94ed5 (patch)
treefa3a53dc2e4297e8200c90e0a3ac4bdb90c9c412 /backends/s390_retval.c
parent47297d8bf2f516b66b6d45934849137ab7658a99 (diff)
downloadelfutils-a4fafb7722c9950dacd5689f1ce8e31f8fa94ed5.tar.gz
backends: Support returning lvalue and rvalue references
On the low level, they are the same as pointers. The change needs to be done for all backends, so define a function and a macro to avoid repetition. Also add a native test, which has to be implemented in C++. Add the configure check for it. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Diffstat (limited to 'backends/s390_retval.c')
-rw-r--r--backends/s390_retval.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/backends/s390_retval.c b/backends/s390_retval.c
index 2043f985..0a01d27f 100644
--- a/backends/s390_retval.c
+++ b/backends/s390_retval.c
@@ -91,8 +91,7 @@ s390_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
case DW_TAG_base_type:
case DW_TAG_enumeration_type:
- case DW_TAG_pointer_type:
- case DW_TAG_ptr_to_member_type:
+ CASE_POINTER:
{
Dwarf_Die cudie;
uint8_t asize;
@@ -103,7 +102,7 @@ s390_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
if (dwarf_formudata (dwarf_attr (typedie, DW_AT_byte_size,
&attr_mem), &size) != 0)
{
- if (tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
+ if (dwarf_is_pointer (tag))
size = asize;
else
return -1;