Sourabh Singh Tomar via llvm-dev
2019-Sep-13 07:24 UTC
[llvm-dev] DWARF-5 Supported languages Tags C++03, C++11,C++14
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>
David Blaikie via llvm-dev
2019-Sep-13 18:07 UTC
[llvm-dev] DWARF-5 Supported languages Tags C++03, C++11,C++14
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
Adrian Prantl via llvm-dev
2019-Sep-13 18:15 UTC
[llvm-dev] DWARF-5 Supported languages Tags C++03, C++11,C++14
> On Sep 13, 2019, at 11:07 AM, David Blaikie <dblaikie at gmail.com> wrote: > > 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?LLDB should be doing the right thing; it knows that all of these are C++. It will ignore the language version for initializing the expression evaluator with that version though, since the expression evaluator is global for the entire program and there is no guarantee that all TUs use the same dialect (also it uses Objective-C++ as the language, always). -- adrian> > 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