summaryrefslogtreecommitdiff
path: root/backends/i386_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/i386_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/i386_retval.c')
-rw-r--r--backends/i386_retval.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/backends/i386_retval.c b/backends/i386_retval.c
index 32fec728..8a9c2a2b 100644
--- a/backends/i386_retval.c
+++ b/backends/i386_retval.c
@@ -89,15 +89,14 @@ i386_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_Word size;
Dwarf_Attribute attr_mem;
if (dwarf_formudata (dwarf_attr_integrate (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 = 4;
else
return -1;