]> granicus.if.org Git - clang/commitdiff
Merging r195970:
authorBill Wendling <isanbard@gmail.com>
Sun, 1 Dec 2013 04:22:48 +0000 (04:22 +0000)
committerBill Wendling <isanbard@gmail.com>
Sun, 1 Dec 2013 04:22:48 +0000 (04:22 +0000)
------------------------------------------------------------------------
r195970 | joerg | 2013-11-29 16:38:16 -0800 (Fri, 29 Nov 2013) | 2 lines

NetBSD uses signed wchar_t on ARM platforms.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196009 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp

index 8b35c9a8aa7a98882dad93b4df8e5adde1249c94..c087a1e9f44e6be0067842e1bb0cbd719b74cdec 100644 (file)
@@ -3708,8 +3708,15 @@ public:
     BigEndian = false;
     SizeType = UnsignedInt;
     PtrDiffType = SignedInt;
-    // AAPCS 7.1.1, ARM-Linux ABI 2.4: type of wchar_t is unsigned int.
-    WCharType = UnsignedInt;
+    switch (getTriple().getOS()) {
+    case llvm::Triple::NetBSD:
+      WCharType = SignedInt;
+      break;
+    default:
+      // AAPCS 7.1.1, ARM-Linux ABI 2.4: type of wchar_t is unsigned int.
+      WCharType = UnsignedInt;
+      break;
+    }
 
     // {} in inline assembly are neon specifiers, not assembly variant
     // specifiers.