public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
* [committed] Support DW_LANG_C_plus_plus_{03,11,14}
@ 2021-02-14  8:06 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2021-02-14  8:06 UTC (permalink / raw)
  To: dwz, jakub

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-14  8:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-14  8:06 [committed] Support DW_LANG_C_plus_plus_{03,11,14} Tom de Vries

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).