The -fshort-wchar option causes wchar_t to become unsigned, in addition to being
16-bits in size.  Implement this by splitting WChar into two enums, like we have
for char.  This fixes a miscompmilation of XULRunner, PR8856.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122558 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/libclang/CXType.cpp b/tools/libclang/CXType.cpp
index 2fe360b..e1297a4 100644
--- a/tools/libclang/CXType.cpp
+++ b/tools/libclang/CXType.cpp
@@ -41,7 +41,8 @@
     BTCASE(UInt128);
     BTCASE(Char_S);
     BTCASE(SChar);
-    BTCASE(WChar);
+    case BuiltinType::WChar_S: return CXType_WChar;
+    case BuiltinType::WChar_U: return CXType_WChar;
     BTCASE(Short);
     BTCASE(Int);
     BTCASE(Long);
@@ -286,7 +287,7 @@
     TKIND(UInt128);
     TKIND(Char_S);
     TKIND(SChar);
-    TKIND(WChar);
+    case CXType_WChar: s = "WChar"; break;
     TKIND(Short);
     TKIND(Int);
     TKIND(Long);