aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index ccfb5df..6255c40 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -5326,8 +5326,9 @@ is_c_family (void)
{
unsigned int lang = get_AT_unsigned (comp_unit_die, DW_AT_language);
- return (lang == DW_LANG_C || lang == DW_LANG_C89
- || lang == DW_LANG_C_plus_plus);
+ return (lang == DW_LANG_C || lang == DW_LANG_C89 || lang == DW_LANG_ObjC
+ || lang == DW_LANG_C99
+ || lang == DW_LANG_C_plus_plus || lang == DW_LANG_ObjC_plus_plus);
}
/* Return TRUE if the language is C++. */
@@ -5335,8 +5336,9 @@ is_c_family (void)
static inline bool
is_cxx (void)
{
- return (get_AT_unsigned (comp_unit_die, DW_AT_language)
- == DW_LANG_C_plus_plus);
+ unsigned int lang = get_AT_unsigned (comp_unit_die, DW_AT_language);
+
+ return lang == DW_LANG_C_plus_plus || lang == DW_LANG_ObjC_plus_plus;
}
/* Return TRUE if the language is Fortran. */
@@ -12204,6 +12206,10 @@ gen_compile_unit_die (const char *filename)
language = DW_LANG_Pascal83;
else if (strcmp (language_string, "GNU Java") == 0)
language = DW_LANG_Java;
+ else if (strcmp (language_string, "GNU Objective-C") == 0)
+ language = DW_LANG_ObjC;
+ else if (strcmp (language_string, "GNU Objective-C++") == 0)
+ language = DW_LANG_ObjC_plus_plus;
else
language = DW_LANG_C89;
@@ -13314,8 +13320,7 @@ dwarf2out_decl (tree decl)
{
/* OK, we need to generate one for `bool' so GDB knows what type
comparisons have. */
- if ((get_AT_unsigned (comp_unit_die, DW_AT_language)
- == DW_LANG_C_plus_plus)
+ if (is_cxx ()
&& TREE_CODE (TREE_TYPE (decl)) == BOOLEAN_TYPE
&& ! DECL_IGNORED_P (decl))
modified_type_die (TREE_TYPE (decl), 0, 0, NULL);