diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp @@ -1130,13 +1130,22 @@ break; case DW_ATE_UTF: - if (!type_name.empty()) { - if (type_name == "char16_t") - return GetType(ast.Char16Ty); - if (type_name == "char32_t") - return GetType(ast.Char32Ty); - if (type_name == "char8_t") - return GetType(ast.Char8Ty); + switch (bit_size) { + case 8: + return GetType(ast.Char8Ty); + case 16: + return GetType(ast.Char16Ty); + case 32: + return GetType(ast.Char32Ty); + default: + if (!type_name.empty()) { + if (type_name == "char16_t") + return GetType(ast.Char16Ty); + if (type_name == "char32_t") + return GetType(ast.Char32Ty); + if (type_name == "char8_t") + return GetType(ast.Char8Ty); + } } break; }