]> granicus.if.org Git - clang/commitdiff
NetBSD uses signed wchar_t on ARM platforms.
authorJoerg Sonnenberger <joerg@bec.de>
Sat, 30 Nov 2013 00:38:16 +0000 (00:38 +0000)
committerJoerg Sonnenberger <joerg@bec.de>
Sat, 30 Nov 2013 00:38:16 +0000 (00:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195970 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp

index 2d61b073de6d4d84a484cbec98c574232bf5f40b..899b1e6014b85d7f7aac62aff1bcee8091838a31 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.