[SymbolFilePDB] Add a test for wchar_t type in PDB.

The wchar_t is unsigned. 

https://msdn.microsoft.com/en-us/library/s3f49ktz.aspx

llvm-svn: 333051
This commit is contained in:
Aaron Smith
2018-05-23 01:58:23 +00:00
parent edd5e29cfe
commit 6de0ca4296
3 changed files with 6 additions and 0 deletions

View File

@@ -41,6 +41,9 @@ WChar16Typedef WC16Var;
typedef char32_t WChar32Typedef;
WChar32Typedef WC32Var;
typedef wchar_t WCharTypedef;
WCharTypedef WCVar;
int main() {
return 0;
}

View File

@@ -26,6 +26,8 @@ CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} double *
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

View File

@@ -66,6 +66,7 @@ lldb::Encoding TranslateBuiltinEncoding(PDB_BuiltinType type) {
case PDB_BuiltinType::UInt:
case PDB_BuiltinType::ULong:
case PDB_BuiltinType::HResult:
case PDB_BuiltinType::WCharT:
return lldb::eEncodingUint;
default:
return lldb::eEncodingInvalid;