diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-15 20:19:23 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-15 20:19:23 +0000 |
commit | 03a61d936de319e710a51182edea73967b7c1646 (patch) | |
tree | 3eeee76c583d6b37c1e438a4ff1bf07b0dc61918 /gcc/cp/cp-lang.c | |
parent | 9238c28d4b8139b38f3b2aadc3d567d52887ebce (diff) | |
download | gcc-03a61d936de319e710a51182edea73967b7c1646.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130960 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-lang.c')
-rw-r--r-- | gcc/cp/cp-lang.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c index b4b7ec40eb9..70709298e9a 100644 --- a/gcc/cp/cp-lang.c +++ b/gcc/cp/cp-lang.c @@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see enum c_language_kind c_language = clk_cxx; static void cp_init_ts (void); static const char * cxx_dwarf_name (tree t, int verbosity); +static enum classify_record cp_classify_record (tree type); /* Lang hooks common to C++ and ObjC++ are declared in cp/cp-objcp-common.h; consequently, there should be very few hooks below. */ @@ -44,6 +45,8 @@ static const char * cxx_dwarf_name (tree t, int verbosity); #define LANG_HOOKS_NAME "GNU C++" #undef LANG_HOOKS_INIT #define LANG_HOOKS_INIT cxx_init +#undef LANG_HOOKS_CLASSIFY_RECORD +#define LANG_HOOKS_CLASSIFY_RECORD cp_classify_record #undef LANG_HOOKS_GENERIC_TYPE_P #define LANG_HOOKS_GENERIC_TYPE_P class_tmpl_impl_spec_p #undef LANG_HOOKS_DECL_PRINTABLE_NAME @@ -153,6 +156,15 @@ cxx_dwarf_name (tree t, int verbosity) return cxx_printable_name (t, verbosity); } +static enum classify_record +cp_classify_record (tree type) +{ + if (CLASSTYPE_DECLARED_CLASS (type)) + return RECORD_IS_CLASS; + + return RECORD_IS_STRUCT; +} + void finish_file (void) { |