This is an archive of the discontinued LLVM Phabricator instance.

[clang][CGDebugInfo] emit DW_LANG_C_plus_plus_{20|17} DW_LANG_C17
AbandonedPublic

Authored by nickdesaulniers on Jan 26 2023, 4:14 PM.

Details

Summary

Looks like these DW_AT_language tags made it into the DWARFv5 spec.
Let's emit them when -std=c++{20|17} or -std=c17.

Link: https://dwarfstd.org/Languages.php

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2023, 4:14 PM
nickdesaulniers requested review of this revision.Jan 26 2023, 4:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2023, 4:14 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

This was discussed in D138597 & we decided not to implement these due to the risk of breaking existing v5 clients that might not know about the post-v5-release codes. Implementing the v6 codes as an extension might be an option, or emitting the post-v5-release codes as an extension/under non-strict mode?

But is there any particular value you're looking for by implementing these?

nickdesaulniers abandoned this revision.Jan 30 2023, 3:13 PM

This was discussed in D138597 & we decided not to implement these due to the risk of breaking existing v5 clients that might not know about the post-v5-release codes. Implementing the v6 codes as an extension might be an option, or emitting the post-v5-release codes as an extension/under non-strict mode?

But is there any particular value you're looking for by implementing these?

Ah, sorry I was lacking that context. No value in particular, just looked like a bug when reading through this code.

Also noting that GCC 12.2.0 does not produce these newer DW_AT_language values when using -std={c17|c++17|c++20}`.