summaryrefslogtreecommitdiff
path: root/gcc/langhooks.h
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2007-12-15 20:19:23 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2007-12-15 20:19:23 +0000
commit394d9fe79e075b4deab317f8bcd9b15be6e37e38 (patch)
tree3eeee76c583d6b37c1e438a4ff1bf07b0dc61918 /gcc/langhooks.h
parentd2f08d98796279fe8886918e7746eb276420545c (diff)
downloadgcc-394d9fe79e075b4deab317f8bcd9b15be6e37e38.tar.gz
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
Diffstat (limited to 'gcc/langhooks.h')
-rw-r--r--gcc/langhooks.h8
1 files changed, 8 insertions, 0 deletions
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);