diff --git a/lldb/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp b/lldb/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp index 8e516201644c..de13a5b430c1 100644 --- a/lldb/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp +++ b/lldb/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp @@ -35,6 +35,9 @@ EnumClass EnumClassVar; enum struct EnumStruct { red, blue, black }; EnumStruct EnumStructVar; +typedef signed char SCharTypedef; +SCharTypedef SCVar; + typedef char16_t WChar16Typedef; WChar16Typedef WC16Var; diff --git a/lldb/lit/SymbolFile/PDB/ast-restore.test b/lldb/lit/SymbolFile/PDB/ast-restore.test index 13476185b5d3..a770e2babc3f 100644 --- a/lldb/lit/SymbolFile/PDB/ast-restore.test +++ b/lldb/lit/SymbolFile/PDB/ast-restore.test @@ -58,7 +58,7 @@ INNER: namespace N0 { INNER: namespace N1 { INNER: class Class : public N0::N1::Base { INNER: struct Inner { -INNER: signed char x; +INNER: char x; INNER: short y; INNER: int z; INNER: }; diff --git a/lldb/lit/SymbolFile/PDB/func-symbols.test b/lldb/lit/SymbolFile/PDB/func-symbols.test index f8c0fa92164a..4340b33aabef 100644 --- a/lldb/lit/SymbolFile/PDB/func-symbols.test +++ b/lldb/lit/SymbolFile/PDB/func-symbols.test @@ -14,7 +14,7 @@ CHECK-ONE-DAG: [[TY0:.*]]: Type{[[UID0:.*]]} , name = "Func_arg_array", decl = CHECK-ONE-DAG: [[TY1:.*]]: Type{[[UID1:.*]]} , name = "Func_arg_void", decl = FuncSymbolsTestMain.cpp:4, compiler_type = {{.*}} void (void) CHECK-ONE-DAG: [[TY2:.*]]: Type{[[UID2:.*]]} , name = "Func_arg_none", decl = FuncSymbolsTestMain.cpp:5, compiler_type = {{.*}} void (void) CHECK-ONE-DAG: [[TY3:.*]]: Type{[[UID3:.*]]} , name = "Func_varargs", decl = FuncSymbolsTestMain.cpp:6, compiler_type = {{.*}} void (...) -CHECK-ONE-DAG: [[TY4:.*]]: Type{[[UID4:.*]]} , name = "Func", decl = FuncSymbolsTestMain.cpp:28, compiler_type = {{.*}} void (signed char, int) +CHECK-ONE-DAG: [[TY4:.*]]: Type{[[UID4:.*]]} , name = "Func", decl = FuncSymbolsTestMain.cpp:28, compiler_type = {{.*}} void (char, int) CHECK-ONE-DAG: [[TY5:.*]]: Type{[[UID5:.*]]} , name = "main", decl = FuncSymbolsTestMain.cpp:44, compiler_type = {{.*}} int (void) CHECK-ONE-DAG: [[TY6:.*]]: Type{[[UID6:.*]]} , name = "Func", decl = FuncSymbolsTestMain.cpp:24, compiler_type = {{.*}} void (int, const long, volatile _Bool, ...) CHECK-ONE-DAG: [[TY7:.*]]: Type{[[UID7:.*]]} , name = "StaticFunction", decl = FuncSymbolsTestMain.cpp:35, compiler_type = {{.*}} long (int) diff --git a/lldb/lit/SymbolFile/PDB/typedefs.test b/lldb/lit/SymbolFile/PDB/typedefs.test index 659ef6392d1c..39514af7d146 100644 --- a/lldb/lit/SymbolFile/PDB/typedefs.test +++ b/lldb/lit/SymbolFile/PDB/typedefs.test @@ -46,9 +46,10 @@ CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} void * CHECK-DAG: Type{{.*}} , name = "long", size = 4, compiler_type = {{.*}} long CHECK-DAG: Type{{.*}} , name = "unsigned short", size = 2, compiler_type = {{.*}} unsigned short CHECK-DAG: Type{{.*}} , name = "unsigned int", size = 4, compiler_type = {{.*}} unsigned int +CHECK-DAG: Type{{.*}} , name = "char", size = 1, compiler_type = {{.*}} char CHECK-DAG: Type{{.*}} , name = "signed char", size = 1, compiler_type = {{.*}} signed char -CHECK-DAG: Type{{.*}} , compiler_type = {{.*}} signed char (void *, long, unsigned short, unsigned int, ...) -CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} signed char (*)(void *, long, unsigned short, unsigned int, ...) +CHECK-DAG: Type{{.*}} , compiler_type = {{.*}} char (void *, long, unsigned short, unsigned int, ...) +CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} char (*)(void *, long, unsigned short, unsigned int, ...) CHECK-DAG: Type{{.*}} , name = "VarArgsFuncTypedef", compiler_type = {{.*}} typedef VarArgsFuncTypedef CHECK-DAG: Type{{.*}} , name = "float", size = 4, compiler_type = {{.*}} float diff --git a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp index 500763070015..150e4c87cf69 100644 --- a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp +++ b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp @@ -113,6 +113,8 @@ GetBuiltinTypeForPDBEncodingAndBitSize(ClangASTContext &clang_ast, return CompilerType(); case PDB_BuiltinType::Void: return clang_ast.GetBasicType(eBasicTypeVoid); + case PDB_BuiltinType::Char: + return clang_ast.GetBasicType(eBasicTypeChar); case PDB_BuiltinType::Bool: return clang_ast.GetBasicType(eBasicTypeBool); case PDB_BuiltinType::Long: