[Lldb-commits] [lldb] r326875 - [SymbolFilePDB] Add missing Char16 and Char32 types in a few places
Aaron Smith via lldb-commits
lldb-commits at lists.llvm.org
Tue Mar 6 21:43:05 PST 2018
Author: asmith
Date: Tue Mar 6 21:43:05 2018
New Revision: 326875
URL: http://llvm.org/viewvc/llvm-project?rev=326875&view=rev
Log:
[SymbolFilePDB] Add missing Char16 and Char32 types in a few places
Reviewers: zturner, rnk, lldb-commits
Subscribers: clayborg, llvm-commits
Differential Revision: https://reviews.llvm.org/D44166
Modified:
lldb/trunk/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp
lldb/trunk/lit/SymbolFile/PDB/typedefs.test
lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
Modified: lldb/trunk/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp?rev=326875&r1=326874&r2=326875&view=diff
==============================================================================
--- lldb/trunk/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp (original)
+++ lldb/trunk/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp Tue Mar 6 21:43:05 2018
@@ -35,6 +35,12 @@ EnumClass EnumClassVar;
enum struct EnumStruct { red, blue, black };
EnumStruct EnumStructVar;
+typedef char16_t WChar16Typedef;
+WChar16Typedef WC16Var;
+
+typedef char32_t WChar32Typedef;
+WChar32Typedef WC32Var;
+
int main() {
return 0;
}
Modified: lldb/trunk/lit/SymbolFile/PDB/typedefs.test
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/PDB/typedefs.test?rev=326875&r1=326874&r2=326875&view=diff
==============================================================================
--- lldb/trunk/lit/SymbolFile/PDB/typedefs.test (original)
+++ lldb/trunk/lit/SymbolFile/PDB/typedefs.test Tue Mar 6 21:43:05 2018
@@ -14,6 +14,8 @@ RUN: lldb-test symbols %T/SimpleTypesTes
CHECK: Module [[MOD:.*]]
CHECK: {{^[0-9A-F]+}}: SymbolVendor ([[MOD]])
+CHECK-DAG: name = "char32_t", size = 4, compiler_type = {{.*}} char32_t
+CHECK-DAG: name = "char16_t", size = 2, compiler_type = {{.*}} char16_t
CHECK-DAG: Type{{.*}} , name = "unsigned long", size = 4, compiler_type = {{.*}} unsigned long
CHECK-DAG: Type{{.*}} , size = 40, compiler_type = {{.*}} unsigned long [10]
CHECK-DAG: Type{{.*}} , name = "ULongArrayTypedef", compiler_type = {{.*}} typedef ULongArrayTypedef
Modified: lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp?rev=326875&r1=326874&r2=326875&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp Tue Mar 6 21:43:05 2018
@@ -59,6 +59,8 @@ lldb::Encoding TranslateBuiltinEncoding(
case PDB_BuiltinType::Int:
case PDB_BuiltinType::Long:
case PDB_BuiltinType::Char:
+ case PDB_BuiltinType::Char16:
+ case PDB_BuiltinType::Char32:
return lldb::eEncodingSint;
case PDB_BuiltinType::Bool:
case PDB_BuiltinType::UInt:
@@ -126,6 +128,10 @@ CompilerType GetBuiltinTypeForPDBEncodin
if (width == ast->getTypeSize(ast->WCharTy))
return CompilerType(ast, ast->WCharTy);
break;
+ case PDB_BuiltinType::Char16:
+ return CompilerType(ast, ast->Char16Ty);
+ case PDB_BuiltinType::Char32:
+ return CompilerType(ast, ast->Char32Ty);
case PDB_BuiltinType::Float:
// Note: types `long double` and `double` have same bit size in MSVC and there
// is no information in the PDB to distinguish them. So when falling back
@@ -162,6 +168,10 @@ ConstString GetPDBBuiltinTypeName(const
return ConstString("HRESULT");
case PDB_BuiltinType::BCD:
return ConstString("BCD");
+ case PDB_BuiltinType::Char16:
+ return ConstString("char16_t");
+ case PDB_BuiltinType::Char32:
+ return ConstString("char32_t");
case PDB_BuiltinType::None:
return ConstString("...");
}
More information about the lldb-commits
mailing list