Index: lib/Basic/Targets/AMDGPU.cpp =================================================================== --- lib/Basic/Targets/AMDGPU.cpp +++ lib/Basic/Targets/AMDGPU.cpp @@ -260,6 +260,10 @@ } MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64; +#if _WIN32 + WCharType = UnsignedShort; + WIntType = UnsignedShort; +#endif } void AMDGPUTargetInfo::adjust(LangOptions &Opts) { Index: test/SemaCXX/amdgpu-wchar.cxx =================================================================== --- /dev/null +++ test/SemaCXX/amdgpu-wchar.cxx @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -triple amdgcn -std=c++11 %s + +typedef __WINT_TYPE__ wint_t; + +#if _WIN32 +static_assert(sizeof(wchar_t)==2, "fail"); +static_assert(sizeof(wint_t)==2, "fail"); +#else +static_assert(sizeof(wchar_t)==4, "fail"); +static_assert(sizeof(wint_t)==4, "fail"); +#endif