summaryrefslogtreecommitdiff
path: root/backends/sparc_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/sparc_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/sparc_retval.c')
-rw-r--r--backends/sparc_retval.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/backends/sparc_retval.c b/backends/sparc_retval.c
index fb81cdce..8b3fb629 100644
--- a/backends/sparc_retval.c
+++ b/backends/sparc_retval.c
@@ -95,8 +95,7 @@ sparc_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_Attribute attr_mem;
if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
@@ -104,7 +103,7 @@ sparc_return_value_location (Dwarf_Die *functypedie, const Dwarf_Op **locp)
{
uint8_t asize;
Dwarf_Die cudie;
- if ((tag == DW_TAG_pointer_type || tag == DW_TAG_ptr_to_member_type)
+ if (dwarf_is_pointer (tag)
&& dwarf_diecu (typedie, &cudie, &asize, NULL) != NULL)
size = asize;
else