2007-09-27 Roland McGrath <roland@redhat.com>
* alpha_retval.c: Use dwarf_attr_integrate and dwarf_hasattr_integrate.
* i386_retval.c: Likewise.
* ia64_retval.c: Likewise.
* ppc64_retval.c: Likewise.
* ppc_retval.c: Likewise.
* s390_retval.c: Likewise.
* sparc_retval.c: Likewise.
* x86_64_retval.c: Likewise.
diff --git a/backends/sparc_retval.c b/backends/sparc_retval.c
index cfde0d2..7cd3827 100644
--- a/backends/sparc_retval.c
+++ b/backends/sparc_retval.c
@@ -1,5 +1,5 @@
/* Function return value location for SPARC.
- Copyright (C) 2006 Red Hat, Inc.
+ Copyright (C) 2006, 2007 Red Hat, Inc.
This program is Open Source software; you can redistribute it and/or
modify it under the terms of the Open Software License version 1.0 as
@@ -59,7 +59,8 @@
which is the type of the return value. */
Dwarf_Attribute attr_mem;
- Dwarf_Attribute *attr = dwarf_attr (functypedie, DW_AT_type, &attr_mem);
+ Dwarf_Attribute *attr = dwarf_attr_integrate (functypedie, DW_AT_type,
+ &attr_mem);
if (attr == NULL)
/* The function has no return value, like a `void' function in C. */
return 0;
@@ -73,7 +74,7 @@
|| tag == DW_TAG_const_type || tag == DW_TAG_volatile_type
|| tag == DW_TAG_restrict_type || tag == DW_TAG_mutable_type)
{
- attr = dwarf_attr (typedie, DW_AT_type, &attr_mem);
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
typedie = dwarf_formref_die (attr, &die_mem);
tag = dwarf_tag (typedie);
}
@@ -85,9 +86,9 @@
return -1;
case DW_TAG_subrange_type:
- if (! dwarf_hasattr (typedie, DW_AT_byte_size))
+ if (! dwarf_hasattr_integrate (typedie, DW_AT_byte_size))
{
- attr = dwarf_attr (typedie, DW_AT_type, &attr_mem);
+ attr = dwarf_attr_integrate (typedie, DW_AT_type, &attr_mem);
typedie = dwarf_formref_die (attr, &die_mem);
tag = dwarf_tag (typedie);
}
@@ -97,8 +98,8 @@
case DW_TAG_enumeration_type:
case DW_TAG_pointer_type:
case DW_TAG_ptr_to_member_type:
- if (dwarf_formudata (dwarf_attr (typedie, DW_AT_byte_size,
- &attr_mem), &size) != 0)
+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
+ &attr_mem), &size) != 0)
{
uint8_t asize;
Dwarf_Die cudie;
@@ -111,8 +112,9 @@
if (tag == DW_TAG_base_type)
{
Dwarf_Word encoding;
- if (dwarf_formudata (dwarf_attr (typedie, DW_AT_encoding,
- &attr_mem), &encoding) != 0)
+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_encoding,
+ &attr_mem),
+ &encoding) != 0)
return -1;
if (encoding == DW_ATE_float)
{
@@ -140,8 +142,8 @@
case DW_TAG_class_type:
case DW_TAG_union_type:
case DW_TAG_array_type:
- if (dwarf_formudata (dwarf_attr (typedie, DW_AT_byte_size,
- &attr_mem), &size) == 0
+ if (dwarf_formudata (dwarf_attr_integrate (typedie, DW_AT_byte_size,
+ &attr_mem), &size) == 0
&& size > 0 && size <= 8)
goto intreg;
goto aggregate;