diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-21 16:29:51 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-21 16:29:51 +0000 |
commit | 952114f80d2fff8fc06e971ea505b5303d2ed19c (patch) | |
tree | cc820f508c3e77bd486eae7090bdd9a97c671d69 | |
parent | a7534a68f03df3aad6e34ee5689d82797fe7d32f (diff) | |
download | gcc-952114f80d2fff8fc06e971ea505b5303d2ed19c.tar.gz |
* dwarf2.h (enum dwarf_type): Add DW_ATE_UTF.
* dwarf2out.c (base_type_die): Use DW_ATE_UTF for
C++ char16_t and char32_t.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161095 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 14 | ||||
-rw-r--r-- | include/ChangeLog | 4 | ||||
-rw-r--r-- | include/dwarf2.h | 2 |
4 files changed, 23 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 95491cc5a1f..ba9f4b8458b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2010-06-21 Jakub Jelinek <jakub@redhat.com> + * dwarf2out.c (base_type_die): Use DW_ATE_UTF for + C++ char16_t and char32_t. + * Makefile.in (build/genattrtab.o): Depend on vecprim.h. * genattrtab.c: Include vecprim.h. (cached_attrs, cached_attr_count, attrs_seen_once, diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index b1f05d9b97d..7a7eb220b3f 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -12377,6 +12377,20 @@ base_type_die (tree type) switch (TREE_CODE (type)) { case INTEGER_TYPE: + if ((dwarf_version >= 4 || !dwarf_strict) + && TYPE_NAME (type) + && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL + && DECL_IS_BUILTIN (TYPE_NAME (type)) + && DECL_NAME (TYPE_NAME (type))) + { + const char *name = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))); + if (strcmp (name, "char16_t") == 0 + || strcmp (name, "char32_t") == 0) + { + encoding = DW_ATE_UTF; + break; + } + } if (TYPE_STRING_FLAG (type)) { if (TYPE_UNSIGNED (type)) diff --git a/include/ChangeLog b/include/ChangeLog index 6b8053f3f29..cf5a944c1f1 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2010-06-21 Jakub Jelinek <jakub@redhat.com> + + * dwarf2.h (enum dwarf_type): Add DW_ATE_UTF. + 2010-06-18 Rafael Espindola <espindola@google.com> * plugin.h (ld_plugin_add_input_file, ld_plugin_add_input_library): diff --git a/include/dwarf2.h b/include/dwarf2.h index 85e7991c69e..03c25812d09 100644 --- a/include/dwarf2.h +++ b/include/dwarf2.h @@ -654,6 +654,8 @@ enum dwarf_type DW_ATE_signed_fixed = 0xd, DW_ATE_unsigned_fixed = 0xe, DW_ATE_decimal_float = 0xf, + /* DWARF 4. */ + DW_ATE_UTF = 0x10, DW_ATE_lo_user = 0x80, DW_ATE_hi_user = 0xff, |