+2010-04-20 Jakub Jelinek <jakub@redhat.com>
+
+ * dwarf2out.c (AT_linkage_name): Define.
+ (clone_as_declaration): Handle DW_AT_linkage_name.
+ (add_name_and_src_coords_attributes): Use AT_linkage_name instead
+ of DW_AT_MIPS_linkage_name.
+ (move_linkage_attr): Likewise.
+ (dwarf2out_finish): Likewise.
+
2010-04-20 Xinliang David Li <davidxl@gcc.gnu.org>
PR middle-end/41952
* fold-const.c (fold_comparison): New folding rule.
-2010-04-20 Anatoly Sokolov <aesok@post.ru
+2010-04-20 Anatoly Sokolov <aesok@post.ru>
* double-int.h (double_int_setbit): Declare.
* double-int.c (double_int_setbit): New function.
static GTY(()) limbo_die_node *limbo_die_list;
/* A list of DIEs for which we may have to generate
- DW_AT_MIPS_linkage_name once their DECL_ASSEMBLER_NAMEs are
- set. */
+ DW_AT_{,MIPS_}linkage_name once their DECL_ASSEMBLER_NAMEs are set. */
static GTY(()) limbo_die_node *deferred_asm_name;
/* Filenames referenced by this compilation unit. */
#define DEBUG_MACINFO_SECTION_LABEL "Ldebug_macinfo"
#endif
+/* Mangled name attribute to use. This used to be a vendor extension
+ until DWARF 4 standardized it. */
+#define AT_linkage_name \
+ (dwarf_version >= 4 ? DW_AT_linkage_name : DW_AT_MIPS_linkage_name)
+
+
/* Definitions of defaults for formats and names of various special
(artificial) labels which may be generated within this file (when the -g
options is used and DWARF2_DEBUGGING_INFO is in effect.
case DW_AT_name:
case DW_AT_type:
case DW_AT_virtuality:
+ case DW_AT_linkage_name:
case DW_AT_MIPS_linkage_name:
add_dwarf_attr (clone, a);
break;
deferred_asm_name = asm_name;
}
else if (DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl))
- add_AT_string (die, DW_AT_MIPS_linkage_name,
+ add_AT_string (die, AT_linkage_name,
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
}
}
DWARF_TYPE_SIGNATURE_SIZE));
}
-/* Move a DW_AT_MIPS_linkage_name attribute just added to dw_die_ref
+/* Move a DW_AT_{,MIPS_}linkage_name attribute just added to dw_die_ref
to the location it would have been added, should we know its
DECL_ASSEMBLER_NAME when we added other attributes. This will
probably improve compactness of debug info, removing equivalent
unsigned ix = VEC_length (dw_attr_node, die->die_attr);
dw_attr_node linkage = *VEC_index (dw_attr_node, die->die_attr, ix - 1);
- gcc_assert (linkage.dw_attr == DW_AT_MIPS_linkage_name);
+ gcc_assert (linkage.dw_attr == AT_linkage_name);
while (--ix > 0)
{
tree decl = node->created_for;
if (DECL_ASSEMBLER_NAME (decl) != DECL_NAME (decl))
{
- add_AT_string (node->die, DW_AT_MIPS_linkage_name,
+ add_AT_string (node->die, AT_linkage_name,
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
move_linkage_attr (node->die);
}