[llvm-dev] DWARF-5 Supported languages Tags C++03, C++11,C++14
David Blaikie via llvm-dev
llvm-dev at lists.llvm.org
Fri Sep 13 11:07:15 PDT 2019
It's OK if LLVM supports things Clang does not.
What does GCC do with the language attribute in different C++
versions? How does LLDB and GDB handle different C++ language versions
specified this way?
On Fri, Sep 13, 2019 at 12:25 AM Sourabh Singh Tomar via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>
> 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
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
More information about the llvm-dev
mailing list