[PATCH] D140544: [DebugInfo] make DW_LANG_C11 respect -gstrict-dwarf
David Blaikie via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 22 08:07:33 PST 2022
dblaikie added inline comments.
================
Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:582
} else if (LO.C11) {
- LangTag = llvm::dwarf::DW_LANG_C11;
+ if (CGO.DebugStrictDwarf && CGO.DwarfVersion < 5)
+ LangTag = llvm::dwarf::DW_LANG_C;
----------------
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?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140544/new/
https://reviews.llvm.org/D140544
More information about the cfe-commits
mailing list