This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] make DW_LANG_C11 respect -gstrict-dwarf
ClosedPublic

Authored by shchenz on Dec 22 2022, 3:13 AM.

Diff Detail

Event Timeline

shchenz created this revision.Dec 22 2022, 3:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 22 2022, 3:13 AM
shchenz requested review of this revision.Dec 22 2022, 3:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 22 2022, 3:13 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
dblaikie added inline comments.Dec 22 2022, 8:07 AM
clang/lib/CodeGen/CGDebugInfo.cpp
581–582

Generally, I think, we downgrade to the nearest/highest version? (for instance today when the user requests C17, they get C11, not C - and when they request C++17 they get C_plus_plus_14, not plain C_plus_plus) I see there's the same choice up in the C++ case too, but not sure it's the right one?

Should probably do the same thing for strict dwarf, and emit this as C99?

shchenz updated this revision to Diff 484994.Dec 22 2022, 5:24 PM

address @dblaikie comments

shchenz marked an inline comment as done.Dec 22 2022, 5:25 PM
shchenz added inline comments.
clang/lib/CodeGen/CGDebugInfo.cpp
581–582

Fair enough.

dblaikie accepted this revision.Dec 23 2022, 11:50 AM

Looks good

This revision is now accepted and ready to land.Dec 23 2022, 11:50 AM
This revision was landed with ongoing or failed builds.Dec 25 2022, 6:01 PM
This revision was automatically updated to reflect the committed changes.
shchenz marked an inline comment as done.