Author: asmith Date: Tue May 22 18:58:23 2018 New Revision: 333051 URL: http://llvm.org/viewvc/llvm-project?rev=333051&view=rev Log: [SymbolFilePDB] Add a test for wchar_t type in PDB.
The wchar_t is unsigned. https://msdn.microsoft.com/en-us/library/s3f49ktz.aspx 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=333051&r1=333050&r2=333051&view=diff ============================================================================== --- lldb/trunk/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp (original) +++ lldb/trunk/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp Tue May 22 18:58:23 2018 @@ -41,6 +41,9 @@ WChar16Typedef WC16Var; typedef char32_t WChar32Typedef; WChar32Typedef WC32Var; +typedef wchar_t WCharTypedef; +WCharTypedef WCVar; + 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=333051&r1=333050&r2=333051&view=diff ============================================================================== --- lldb/trunk/lit/SymbolFile/PDB/typedefs.test (original) +++ lldb/trunk/lit/SymbolFile/PDB/typedefs.test Tue May 22 18:58:23 2018 @@ -26,6 +26,8 @@ CHECK-DAG: Type{{.*}} , size = 4, compil CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} double *& CHECK-DAG: Type{{.*}} , name = "RefTypedef", compiler_type = {{.*}} typedef RefTypedef +CHECK-DAG: Type{{.*}} , name = "wchar_t", size = 2, compiler_type = {{.*}} wchar_t + CHECK-DAG: Type{{.*}} , name = "int", size = 4, compiler_type = {{.*}} int CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} int & CHECK-DAG: Type{{.*}} , name = "unsigned char", size = 1, compiler_type = {{.*}} unsigned char 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=333051&r1=333050&r2=333051&view=diff ============================================================================== --- lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp (original) +++ lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp Tue May 22 18:58:23 2018 @@ -66,6 +66,7 @@ lldb::Encoding TranslateBuiltinEncoding( case PDB_BuiltinType::UInt: case PDB_BuiltinType::ULong: case PDB_BuiltinType::HResult: + case PDB_BuiltinType::WCharT: return lldb::eEncodingUint; default: return lldb::eEncodingInvalid; _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits