diff options
author | Mark Wielaard <mjw@redhat.com> | 2014-12-08 22:32:23 +0000 |
---|---|---|
committer | Mark Wielaard <mark@gcc.gnu.org> | 2014-12-08 22:32:23 +0000 |
commit | bc3518da23383b0e173020a46334fe22b6b67891 (patch) | |
tree | 531ce47029cd14edfcc8e5647401475bb0f0b787 /gcc/dwarf2out.c | |
parent | 009a34807ec71e18107582878b61096a584110a2 (diff) | |
download | gcc-bc3518da23383b0e173020a46334fe22b6b67891.zip gcc-bc3518da23383b0e173020a46334fe22b6b67891.tar.gz gcc-bc3518da23383b0e173020a46334fe22b6b67891.tar.bz2 |
DWARFv5 Emit DW_TAG_atomic_type for C11 _Atomic.
This implements the DW_TAG_atomic_type for C11 _Atomic proposal as adopted
in the latest DWARF5 draft. http://dwarfstd.org/ShowIssue.php?issue=131112.1
gcc/ChangeLog
PR debug/60782
* dwarf2out.c (modified_type_die): Handle TYPE_QUAL_ATOMIC.
gcc/testsuite/ChangeLog
PR debug/60782
* gcc.dg/debug/dwarf2/atomic.c: New test.
* gcc.dg/debug/dwarf2/stacked-qualified-types-3.c: Likewise.
include/ChangeLog
PR debug/60782
* dwarf2.def: Add DWARFv5 DW_TAG_atomic_type.
From-SVN: r218496
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index ca1e3ef..34b327e7 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -10551,7 +10551,7 @@ modified_type_die (tree type, int cv_quals, dw_die_ref context_die) dw_die_ref mod_scope; /* Only these cv-qualifiers are currently handled. */ const int cv_qual_mask = (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE - | TYPE_QUAL_RESTRICT); + | TYPE_QUAL_RESTRICT | TYPE_QUAL_ATOMIC); if (code == ERROR_MARK) return NULL; @@ -10564,6 +10564,10 @@ modified_type_die (tree type, int cv_quals, dw_die_ref context_die) if (dwarf_version < 3) cv_quals &= ~TYPE_QUAL_RESTRICT; + /* Likewise for DW_TAG_atomic_type for DWARFv5. */ + if (dwarf_version < 5) + cv_quals &= ~TYPE_QUAL_ATOMIC; + /* See if we already have the appropriately qualified variant of this type. */ qualified_type = get_qualified_type (type, cv_quals); @@ -10625,6 +10629,7 @@ modified_type_die (tree type, int cv_quals, dw_die_ref context_die) struct qual_info { int q; enum dwarf_tag t; }; static const struct qual_info qual_info[] = { + { TYPE_QUAL_ATOMIC, DW_TAG_atomic_type }, { TYPE_QUAL_RESTRICT, DW_TAG_restrict_type }, { TYPE_QUAL_VOLATILE, DW_TAG_volatile_type }, { TYPE_QUAL_CONST, DW_TAG_const_type }, |