mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[AsmPrinter, CodeView] There are some more ways of getting wchar_t
C++ has a builtin type called wchar_t. Clang also provides a type called __wchar_t in C mode. In C mode, wchar_t can be a typedef to unsigned short. llvm-svn: 271793
This commit is contained in:
parent
08e81eef3f
commit
37e7fb37c7
@ -769,6 +769,9 @@ TypeIndex CodeViewDebug::lowerTypeAlias(const DIDerivedType *Ty) {
|
||||
if (UnderlyingTypeIndex == TypeIndex(SimpleTypeKind::Int32Long) &&
|
||||
Ty->getName() == "HRESULT")
|
||||
return TypeIndex(SimpleTypeKind::HResult);
|
||||
if (UnderlyingTypeIndex == TypeIndex(SimpleTypeKind::UInt16Short) &&
|
||||
Ty->getName() == "wchar_t")
|
||||
return TypeIndex(SimpleTypeKind::WideCharacter);
|
||||
return UnderlyingTypeIndex;
|
||||
}
|
||||
|
||||
@ -854,9 +857,8 @@ TypeIndex CodeViewDebug::lowerTypeBasic(const DIBasicType *Ty) {
|
||||
STK = SimpleTypeKind::Int32Long;
|
||||
if (STK == SimpleTypeKind::UInt32 && Ty->getName() == "long unsigned int")
|
||||
STK = SimpleTypeKind::UInt32Long;
|
||||
if ((STK == SimpleTypeKind::Int16Short ||
|
||||
STK == SimpleTypeKind::UInt16Short) &&
|
||||
Ty->getName() == "wchar_t")
|
||||
if (STK == SimpleTypeKind::UInt16Short &&
|
||||
(Ty->getName() == "wchar_t" || Ty->getName() == "__wchar_t"))
|
||||
STK = SimpleTypeKind::WideCharacter;
|
||||
if ((STK == SimpleTypeKind::SignedCharacter ||
|
||||
STK == SimpleTypeKind::UnsignedCharacter) &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user