diff options
Diffstat (limited to 'lldb/source/Symbol/ClangASTContext.cpp')
| -rw-r--r-- | lldb/source/Symbol/ClangASTContext.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp index a3eb0b68225..c7eef43f009 100644 --- a/lldb/source/Symbol/ClangASTContext.cpp +++ b/lldb/source/Symbol/ClangASTContext.cpp @@ -904,7 +904,8 @@ ClangASTContext::GetBuiltinTypeForDWARFEncodingAndBitSize (const char *type_name if (type_name) { if (streq(type_name, "wchar_t") && - QualTypeMatchesBitSize (bit_size, ast, ast->WCharTy)) + QualTypeMatchesBitSize (bit_size, ast, ast->WCharTy) && + TargetInfo::isTypeSigned (getTargetInfo()->getWCharType())) return ClangASTType (ast, ast->WCharTy.getAsOpaquePtr()); if (streq(type_name, "void") && QualTypeMatchesBitSize (bit_size, ast, ast->VoidTy)) @@ -961,6 +962,14 @@ ClangASTContext::GetBuiltinTypeForDWARFEncodingAndBitSize (const char *type_name case DW_ATE_unsigned: if (type_name) { + if (streq(type_name, "wchar_t")) + { + if (QualTypeMatchesBitSize (bit_size, ast, ast->WCharTy)) + { + if (!TargetInfo::isTypeSigned (getTargetInfo()->getWCharType())) + return ClangASTType (ast, ast->WCharTy.getAsOpaquePtr()); + } + } if (strstr(type_name, "long long")) { if (QualTypeMatchesBitSize (bit_size, ast, ast->UnsignedLongLongTy)) |

