[all-commits] [llvm/llvm-project] 0301a4: [lldb][Language] Add more language types
Michael Buch via All-commits
all-commits at lists.llvm.org
Fri Apr 14 09:10:54 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0301a492f43efc3a2c1fa1bddd16e46aac8ab77e
https://github.com/llvm/llvm-project/commit/0301a492f43efc3a2c1fa1bddd16e46aac8ab77e
Author: Michael Buch <michaelbuch12 at gmail.com>
Date: 2023-04-14 (Fri, 14 Apr 2023)
Changed paths:
M lldb/include/lldb/lldb-enumerations.h
M lldb/source/Target/Language.cpp
Log Message:
-----------
[lldb][Language] Add more language types
Adds more languages to the `language_names` list in
preparation for adding support for C++20 expression
evaluation.
The language constants were taken from the DWARFv5
constants defined in LLVM's `Dwarf.def`. Two vendor
constants overlap with the DWARFv5 constants so bump
their values. Their actual value is not important,
whereas keeping the enum values consecutive is (since
they are used for array lookups).
Differential Revision: https://reviews.llvm.org/D143061
Commit: 89cd0e8c267f57004a734c94ff15c6bd0facf646
https://github.com/llvm/llvm-project/commit/89cd0e8c267f57004a734c94ff15c6bd0facf646
Author: Michael Buch <michaelbuch12 at gmail.com>
Date: 2023-04-14 (Fri, 14 Apr 2023)
Changed paths:
M lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
M lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp
M lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
M lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
M lldb/source/Target/Language.cpp
A lldb/test/API/lang/cpp/standards/cpp20/Makefile
A lldb/test/API/lang/cpp/standards/cpp20/TestCPP20Standard.py
A lldb/test/API/lang/cpp/standards/cpp20/main.cpp
M lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp
Log Message:
-----------
[lldb] Allow evaluating expressions in C++20 mode
This patch allows users to evaluate expressions using
`expr -l c++20`. Currently DWARF keeps the CU's at
`DW_AT_language` at `DW_LANG_C_plus_plus_14` even
when compiling with `-std=c++20`. So even in "C++20
programs" expression evaluation will by default be
performed in `C++11` mode for now.
Enabling `C++14` has been previously attempted at
https://reviews.llvm.org/D80308
There are some remaining issues around evaluating C++20
expressions. Mainly, lack of support for C++20 AST nodes in
`clang::ASTImporter`. But these can be addressed in follow-up
patches.
Compare: https://github.com/llvm/llvm-project/compare/7dbf5ce538bc...89cd0e8c267f
More information about the All-commits
mailing list