[llvm-dev] DWARF-5 Supported languages Tags C++03, C++11,C++14

Sourabh Singh Tomar via llvm-dev llvm-dev at lists.llvm.org
Fri Sep 13 00:24:45 PDT 2019


Hello Everyone,

I'm working on providing support for New Language Tags, prescribed in
DWARF-5.
DW_LANG_C_plus_plus_03
DW_LANG_C_plus_plus_11
DW_LANG_C_plus_plus_14

While, C++11 and C++14, is defined and can be emitted by Frontend.
"include/clang/Basci/LangStandard.h"
CPlusPlus = (1 << 5),
CPlusPlus11 = (1 << 6),
CPlusPlus14 = (1 << 7),
CPlusPlus17 = (1 << 8),
 CPlusPlus2a = (1 << 9),

Currently CLANG emits "DW_LANG_C_plus_plus" which in DWARF suggests ISO
C++98, regardless of the -std=... specified in commandline.
Also in file  "include/clang/Basci/LangStandards.def"  CLANG has aliased
c++98 and c++03.
// C++ modes
 LANGSTANDARD(cxx98, "c++98",
              CXX, "ISO C++ 1998 with amendments",
              LineComment | CPlusPlus | Digraphs)
 LANGSTANDARD_ALIAS(cxx98, "c++03")

So, my query is that since, c++98 and c++03 is mostly same assuming CLANG
Frontend.
Should we also support DW_LANG_C_plus_plus_03 ? for -std=c++03 in Frontend
or let it remain alias of c++98.

LLVM AsmPrinters has already code for supporting these new DWARF-5 Language
Tags.
So, If we decide not to go with DW_LANG_C_plus_plus_03, we'll have to
remove it's reference from llvm, since frontend won't emit it at all.

Thanks!
Sourabh Singh Tomar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190913/dc5f7ab9/attachment-0001.html>


More information about the llvm-dev mailing list