[PATCH] D140544: [DebugInfo] make DW_LANG_C11 respect -gstrict-dwarf

ChenZheng via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 22 17:25:50 PST 2022


shchenz marked an inline comment as done.
shchenz 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;
----------------
dblaikie wrote:
> 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?
> 
Fair enough.


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