summaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-30 14:00:25 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-30 14:00:25 +0000
commitbde7be7a8a4d1c370439e63fdd95b1f19d890fd8 (patch)
treecea90bd13d074c82a94d0faa81f02b6cfc530426 /gcc/dwarf2out.c
parent1c6585ca5e82b33d3b67146ad3f797c673b2a606 (diff)
downloadgcc-bde7be7a8a4d1c370439e63fdd95b1f19d890fd8.tar.gz
* dwarf2out.c (is_cxx): New fn.
(add_data_member_location_attribute): Check it. * dbxout.c (dbxout_type): Only look at BINFO_VPTR_FIELD for C++. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47483 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 55bb26420bd..557730dc892 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -4831,6 +4831,13 @@ is_c_family ()
}
static inline int
+is_cxx ()
+{
+ return (get_AT_unsigned (comp_unit_die, DW_AT_language)
+ == DW_LANG_C_plus_plus);
+}
+
+static inline int
is_fortran ()
{
unsigned lang = get_AT_unsigned (comp_unit_die, DW_AT_language);
@@ -8414,7 +8421,7 @@ add_data_member_location_attribute (die, decl)
{
/* We're working on the TAG_inheritance for a base class. */
- if (TREE_VIA_VIRTUAL (decl))
+ if (TREE_VIA_VIRTUAL (decl) && is_cxx ())
{
/* For C++ virtual bases we can't just use BINFO_OFFSET, as they
aren't at a fixed offset from all (sub)objects of the same