[PATCH] D52468: [PDB] Treat `char`, `signed char` and `unsigned char` as three different types
Aleksandr Urakov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 28 01:01:28 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL343298: [PDB] Handle `char` as a builtin type (authored by aleksandr.urakov, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D52468?vs=166876&id=167433#toc
Repository:
rL LLVM
https://reviews.llvm.org/D52468
Files:
lldb/trunk/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp
lldb/trunk/lit/SymbolFile/PDB/ast-restore.test
lldb/trunk/lit/SymbolFile/PDB/func-symbols.test
lldb/trunk/lit/SymbolFile/PDB/typedefs.test
lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
Index: lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
===================================================================
--- lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
+++ lldb/trunk/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
@@ -113,6 +113,8 @@
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:
Index: lldb/trunk/lit/SymbolFile/PDB/ast-restore.test
===================================================================
--- lldb/trunk/lit/SymbolFile/PDB/ast-restore.test
+++ lldb/trunk/lit/SymbolFile/PDB/ast-restore.test
@@ -58,7 +58,7 @@
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: };
Index: lldb/trunk/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp
===================================================================
--- lldb/trunk/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp
+++ lldb/trunk/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp
@@ -35,6 +35,9 @@
enum struct EnumStruct { red, blue, black };
EnumStruct EnumStructVar;
+typedef signed char SCharTypedef;
+SCharTypedef SCVar;
+
typedef char16_t WChar16Typedef;
WChar16Typedef WC16Var;
Index: lldb/trunk/lit/SymbolFile/PDB/typedefs.test
===================================================================
--- lldb/trunk/lit/SymbolFile/PDB/typedefs.test
+++ lldb/trunk/lit/SymbolFile/PDB/typedefs.test
@@ -46,9 +46,10 @@
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
Index: lldb/trunk/lit/SymbolFile/PDB/func-symbols.test
===================================================================
--- lldb/trunk/lit/SymbolFile/PDB/func-symbols.test
+++ lldb/trunk/lit/SymbolFile/PDB/func-symbols.test
@@ -14,7 +14,7 @@
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52468.167433.patch
Type: text/x-patch
Size: 4281 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180928/f784e35d/attachment.bin>
More information about the llvm-commits
mailing list