[PATCH] D67613: [DWARF-5] Support for DWARF-5 C++ language tags

Sourabh Singh Tomar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 16 23:23:25 PDT 2019


SouraVX marked 3 inline comments as done.
SouraVX added inline comments.


================
Comment at: include/clang/AST/DeclCXX.h:2931
+    lang_cxx_11 = /* DW_LANG_C_plus_plus_11 */ 0x001a,
+    lang_cxx_14 = /* DW_LANG_C_plus_plus_14 */ 0x0021
   };
----------------
aprantl wrote:
> I understand that DWARF does not define a C++17 language constant, but in the AST I fell like we should represent it, even if it is being lowered into C++14 for the debug info.
It's represented in AST as enum in LangStandard.h file. We didn't add it here, as DWARF5 has no opcode for C++17. If we add it here some opcode, this might cause conflict with future upcoming DWARF standard.


================
Comment at: lib/AST/DeclPrinter.cpp:1009
+      l = "C++_14";
+    else if (D->getLanguage() == LinkageSpecDecl::lang_cxx_11)
+      l = "C++_11";
----------------
aprantl wrote:
> Can you turn this into a switch() statement?
Done


Repository:
  rC Clang

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

https://reviews.llvm.org/D67613





More information about the cfe-commits mailing list