Add char8_t support (C++20)
This patch adds support for the char8_t type introduced in C++20
char8_t. The original patch was submitted by James Blachly on the LLDB
mailing list [1]. I modified the patch a bit and added a test.
[1] http://lists.llvm.org/pipermail/lldb-dev/2019-August/015393.html
Differential revision: https://reviews.llvm.org/D66447
llvm-svn: 369582
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index dbef32c..43b19fb 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -1384,11 +1384,12 @@
case DW_ATE_UTF:
if (type_name) {
- if (streq(type_name, "char16_t")) {
+ if (streq(type_name, "char16_t"))
return CompilerType(this, ast->Char16Ty.getAsOpaquePtr());
- } else if (streq(type_name, "char32_t")) {
+ else if (streq(type_name, "char32_t"))
return CompilerType(this, ast->Char32Ty.getAsOpaquePtr());
- }
+ else if (streq(type_name, "char8_t"))
+ return CompilerType(this, ast->Char8Ty.getAsOpaquePtr());
}
break;
}