public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com
Subject: [committed] Support DW_LANG_C_plus_plus_{03,11,14}
Date: Sun, 14 Feb 2021 09:06:48 +0100	[thread overview]
Message-ID: <20210214080647.GA8986@delia> (raw)

Hi,

When compiling with f.i. g++ 7.5.0, we have GNU C++14 by default:
...
<d3> DW_AT_producer: GNU C++14 7.5.0 -mtune=generic -march=x86-64 -g
...
and the corresponding language setting is:
...
<d7> DW_AT_language: 4        (C++)
...

However, with -gdwarf-5, we have instead:
...
<d4> DW_AT_producer: GNU C++14 7.5.0 -mtune=generic -march=x86-64 -gdwarf-5
<d8> DW_AT_language: 33       (C++14)
...

The current checks in dwz (for --odr and --devel-gen-cu) for language C++
compare only with DW_LANG_C_plus_plus.

Fix this by comparing in addition with DW_LANG_C_plus_plus_{03,11,14}.

Committed to trunk.

Thanks,
- Tom

Support DW_LANG_C_plus_plus_{03,11,14}

2021-02-14  Tom de Vries  <tdevries@suse.de>

	* dwz.c (set_die_odr_state, partition_lang): Add support for
	DW_LANG_C_plus_plus_{03,11,14}.

---
 dwz.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dwz.c b/dwz.c
index d6b9df0..992da77 100644
--- a/dwz.c
+++ b/dwz.c
@@ -3240,6 +3240,9 @@ set_die_odr_state (dw_cu_ref cu, dw_die_ref die)
   switch (cu->lang)
     {
     case DW_LANG_C_plus_plus:
+    case DW_LANG_C_plus_plus_03:
+    case DW_LANG_C_plus_plus_11:
+    case DW_LANG_C_plus_plus_14:
       /* c++ defines one-definition-rule.  */
       if (die->die_tag == DW_TAG_structure_type
 	  || die->die_tag == DW_TAG_class_type
@@ -7745,6 +7748,9 @@ partition_lang (dw_die_ref die)
   switch (lang)
     {
     case DW_LANG_C_plus_plus:
+    case DW_LANG_C_plus_plus_03:
+    case DW_LANG_C_plus_plus_11:
+    case DW_LANG_C_plus_plus_14:
       break;
     default:
       return 0;

                 reply	other threads:[~2021-02-14  8:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210214080647.GA8986@delia \
    --to=tdevries@suse.de \
    --cc=dwz@sourceware.org \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).