This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Use DW_LANG_Go for Go
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: dje at google dot com
- Date: Wed, 28 Dec 2011 16:19:21 -0800
- Subject: Use DW_LANG_Go for Go
This patch to gcc uses the new DW_LANG_Go DWARF language code for Go.
Bootstrapped and ran testsuite on x86_64-unknown-linux-gnu. Committed
on the basis of 1) I am a middle-end maintainer; 2) I am a Go
maintainer; 3) the patch is obvious.
Ian
2011-12-28 Ian Lance Taylor <iant@google.com>
* dwarf2out.c (gen_compile_unit_die): Use DW_LANG_Go for Go.
Index: dwarf2out.c
===================================================================
--- dwarf2out.c (revision 182694)
+++ dwarf2out.c (working copy)
@@ -18433,6 +18433,11 @@ gen_compile_unit_die (const char *filena
language = DW_LANG_ObjC;
else if (strcmp (language_string, "GNU Objective-C++") == 0)
language = DW_LANG_ObjC_plus_plus;
+ else if (dwarf_version >= 5 || !dwarf_strict)
+ {
+ if (strcmp (language_string, "GNU Go") == 0)
+ language = DW_LANG_Go;
+ }
}
add_AT_unsigned (die, DW_AT_language, language);