From 394d9fe79e075b4deab317f8bcd9b15be6e37e38 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sat, 15 Dec 2007 20:19:23 +0000 Subject: re PR debug/7081 (DWARF enhancements for C++) gcc/ChangeLog: PR debug/7081 * dwarf2out.c (dwarf_tag_name): Synchronize with dwarf2.h. (is_type_die): Cover interface types. (class_or_namespace_scope_p): Cover interface and class types. (record_type_tag): New. (gen_inlined_structure_type_die): Use it. (gen_struct_or_union_type_die): Likewise. (prune_unused_types_walk): Cover interface types. * langhooks.h (classify_record): New enum. (classify_record): New member in struct langhooks_for_types. * langhooks-def.h (LANG_HOOKS_CLASSIFY_RECORD): New. (LANGHOOKS_FOR_TYPES_INITIALIZER): Adjust. gcc/cp/ChangeLog: PR debug/7081 * cp-lang.c (cp_classify_record): New. (LANG_HOOKS_CLASSIFY_RECORD): Override. gcc/java/ChangeLog: PR debug/7081 * lang.c (java_classify_record): New. (LANG_HOOKS_CLASSIFY_RECORD): Override. From-SVN: r130960 --- gcc/langhooks.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/langhooks.h') diff --git a/gcc/langhooks.h b/gcc/langhooks.h index 0b97f26cabe..bbbcc6808c0 100644 --- a/gcc/langhooks.h +++ b/gcc/langhooks.h @@ -33,6 +33,9 @@ struct array_descr_info; /* A print hook for print_tree (). */ typedef void (*lang_print_tree_hook) (FILE *, tree, int indent); +enum classify_record + { RECORD_IS_STRUCT, RECORD_IS_CLASS, RECORD_IS_INTERFACE }; + /* The following hooks are documented in langhooks.c. Must not be NULL. */ @@ -91,6 +94,11 @@ struct lang_hooks_for_types language-specific processing is required. */ tree (*make_type) (enum tree_code); + /* Return what kind of RECORD_TYPE this is, mainly for purposes of + debug information. If not defined, record types are assumed to + be structures. */ + enum classify_record (*classify_record) (tree); + /* Given MODE and UNSIGNEDP, return a suitable type-tree with that mode. */ tree (*type_for_mode) (enum machine_mode, int); -- cgit v1.2.1