shchenz added a comment.

In D104291#2821581 <https://reviews.llvm.org/D104291#2821581>, @stuart wrote:

>> There is no `CPlusPlus03` in `LangOptions`, so it is better not to merge 
>> `DW_LANG_C_plus_plus_03` support with D99250 
>> <https://reviews.llvm.org/D99250>.
>
> Oh - I see, `c++03` is defined in LangStandards.def an alias for `c++98`, as 
> the former essentially consists of bugfixes for the latter. This loosely 
> suggests to me that C++03 implementations are (likely to be / mostly?) 
> conformant to C++98, but that C++98 implementations may not be fully 
> conformant to C++03. Given this alias, it doesn't seem at all clear to me 
> which of DW_LANG_C_plus_plus_98 and DW_LANG_C_plus_plus_03 would be the 
> better choice, if both C++98 and C++03 must share a language tag... but I 
> presume this has been discussed before. (It also doesn't seem clear whether 
> it would be better to model "c++98" as an alias for "c++03".)
>
>> Yes, we don't have `DW_LANG_C_plus_plus_17` and `DW_LANG_C_plus_plus_20` in 
>> clang for now. I guess this is because clang does not support DWARF 6. DWARF 
>> 6 is not officially released? Once DWARF 6 is released and clang starts to 
>> support DWARF 6, I think we should add the support for 
>> `DW_LANG_C_plus_plus_17` and `DW_LANG_C_plus_plus_20` in the place that this 
>> patch changes.
>
> New DWARF language codes <http://dwarfstd.org/Languages.php> are published 
> ahead of the release of the next version of DWARF, so that they may be used 
> by implementations without having to wait for new DWARF version.
>
> It would therefore make sense to go ahead and add `DW_LANG_C_plus_plus_17` 
> and `DW_LANG_C_plus_plus_20` now, without waiting, but only in the non-strict 
> DWARF mode. (There would be the question of whether it would still make sense 
> in the code to say "DwarfVersion >= 6" given that DWARF 6 would be otherwise 
> unsupported... but I don't have a strong view on that question.)

I think it would be strange to check `DwarfVersion >= 6` if we can not set 
dwarf version to 6 by anyways. Maybe we can first add the DWARF 6 support to 
the front end first. This is the patch where `-gdwarf-5` was introduced 
https://reviews.llvm.org/rG3cb592d6b60c. Seems it was also before DWARF 5 was 
official released.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104291/new/

https://reviews.llvm.org/D104291

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D104291: [Debug-Info... ChenZheng via Phabricator via cfe-commits

Reply via email to