aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorAnthony Green <green@cygnus.com>2000-08-03 21:04:42 +0000
committerNick Clifton <nickc@gcc.gnu.org>2000-08-03 21:04:42 +0000
commit28985b8152d9a1cf207545ee0b4328a322cfad2b (patch)
tree64134f63d177542c0e7860e254607f42b3d980f9 /gcc/dwarf2out.c
parente81b330a2d0278a03132221ae1d90f7ccd2bb758 (diff)
downloadgcc-28985b8152d9a1cf207545ee0b4328a322cfad2b.zip
gcc-28985b8152d9a1cf207545ee0b4328a322cfad2b.tar.gz
gcc-28985b8152d9a1cf207545ee0b4328a322cfad2b.tar.bz2
Apply patch from Anthony Green to add java language support to Dwarf generation.
From-SVN: r35460
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index ed78012..5b1ec04 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -3324,6 +3324,7 @@ static unsigned get_AT_unsigned PARAMS ((dw_die_ref,
static inline dw_die_ref get_AT_ref PARAMS ((dw_die_ref,
enum dwarf_attribute));
static int is_c_family PARAMS ((void));
+static int is_java PARAMS ((void));
static int is_fortran PARAMS ((void));
static void remove_AT PARAMS ((dw_die_ref,
enum dwarf_attribute));
@@ -4516,6 +4517,14 @@ is_fortran ()
return (lang == DW_LANG_Fortran77 || lang == DW_LANG_Fortran90);
}
+static inline int
+is_java ()
+{
+ register unsigned lang = get_AT_unsigned (comp_unit_die, DW_AT_language);
+
+ return (lang == DW_LANG_Java);
+}
+
/* Free up the memory used by A. */
static inline void free_AT PARAMS ((dw_attr_ref));
@@ -7407,7 +7416,7 @@ add_bound_info (subrange_die, bound_attr, bound)
case INTEGER_CST:
if (! host_integerp (bound, 0)
|| (bound_attr == DW_AT_lower_bound
- && ((is_c_family () && integer_zerop (bound))
+ && (((is_c_family () || is_java ()) && integer_zerop (bound))
|| (is_fortran () && integer_onep (bound)))))
/* use the default */
;
@@ -9036,6 +9045,8 @@ gen_compile_unit_die (filename)
language = DW_LANG_Fortran77;
else if (strcmp (language_string, "GNU Pascal") == 0)
language = DW_LANG_Pascal83;
+ else if (strcmp (language_string, "GNU Java") == 0)
+ language = DW_LANG_Java;
else if (flag_traditional)
language = DW_LANG_C;
else