This patch provides support for DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 tags in clang C++ frontend.
Details
- Reviewers
aprantl dblaikie - Commits
- rG350de4f05d8f: Support for DWARF-5 C++ language tags.
rL372681: Support for DWARF-5 C++ language tags.
rC372681: Support for DWARF-5 C++ language tags.
rGbf9c8ffb5494: Support for DWARF-5 C++ language tags.
rC372663: Support for DWARF-5 C++ language tags.
rL372663: Support for DWARF-5 C++ language tags.
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/clang/AST/DeclCXX.h | ||
---|---|---|
2931 ↗ | (On Diff #220311) | 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. |
lib/AST/DeclPrinter.cpp | ||
1009 ↗ | (On Diff #220311) | Can you turn this into a switch() statement? |
1010 ↗ | (On Diff #220311) | Why this weird spelling with the underscore? |
include/clang/AST/DeclCXX.h | ||
---|---|---|
2931 ↗ | (On Diff #220311) | 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. |
lib/AST/DeclPrinter.cpp | ||
1009 ↗ | (On Diff #220311) | Done |
include/clang/AST/DeclCXX.h | ||
---|---|---|
2931 ↗ | (On Diff #220311) | Since these are the DWARF DW_lang constants, we shouldn't repeat their numeric values here. Can we write this as |
include/clang/AST/DeclCXX.h | ||
---|---|---|
2931 ↗ | (On Diff #220311) | We can do this, but not sure whether, we should do this in AST ? |
include/clang/AST/DeclCXX.h | ||
---|---|---|
2931 ↗ | (On Diff #220311) | I'm not sure I understand the concern here. Are you worried about #Including "llvm/BinaryFormat/DWARF.h" and making these definitions visible to users of DeclCXX.h? All symbols there are in a separate namespace. |
include/clang/AST/DeclCXX.h | ||
---|---|---|
2931 ↗ | (On Diff #220311) | Thanks @aprantl for your review. |
@aprantl , Could you commit these changes, I don't have commit access rights.
Thanks!
/srv/llvm-buildbot-srcatch/llvm-build-dir/clang-x86_64-debian-fast/llvm.src/tools/clang/tools/extra/modularize/Modularize.cpp:583:13: warning: enumeration values 'lang_cxx_11' and 'lang_cxx_14' not handled in switch [-Wswitch]
1 warning generated.
I reverted this in r372672 because it caused a test failure in LLDB: http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/1748/
We also get that warning when compiling with clang 8:
../../clang-tools-extra/modularize/Modularize.cpp:583:13: error: enumeration values 'lang_cxx_11' and 'lang_cxx_14' not handled in switch [-Werror,-Wswitch] switch (D->getLanguage()) { ^ 1 error generated.
I did something about it in r372714. Please take a look and see if it should be fixed differently.
Hi Thanks for doing this, I got occupied by something else. that seems good.
Thanks again!