r195970 - NetBSD uses signed wchar_t on ARM platforms.

Joerg Sonnenberger joerg at bec.de
Fri Nov 29 16:38:16 PST 2013


Author: joerg
Date: Fri Nov 29 18:38:16 2013
New Revision: 195970

URL: http://llvm.org/viewvc/llvm-project?rev=195970&view=rev
Log:
NetBSD uses signed wchar_t on ARM platforms.

Modified:
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=195970&r1=195969&r2=195970&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Fri Nov 29 18:38:16 2013
@@ -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.





More information about the cfe-commits mailing list