r200655 - NetBSD uses signed wchar_t on AArch64. It also wants __LITTLE_ENDIAN__ /
Joerg Sonnenberger
joerg at bec.de
Sun Feb 2 13:55:10 PST 2014
Author: joerg
Date: Sun Feb 2 15:55:10 2014
New Revision: 200655
URL: http://llvm.org/viewvc/llvm-project?rev=200655&view=rev
Log:
NetBSD uses signed wchar_t on AArch64. It also wants __LITTLE_ENDIAN__ /
__BIG_ENDIAN__ as on other architectures.
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=200655&r1=200654&r2=200655&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Sun Feb 2 15:55:10 2014
@@ -3375,6 +3375,10 @@ public:
DescriptionString = "e-m:e-i64:64-i128:128-n32:64-S128";
WCharType = UnsignedInt;
+ if (getTriple().getOS() == llvm::Triple::NetBSD)
+ WCharType = SignedInt;
+ else
+ WCharType = UnsignedInt;
LongDoubleFormat = &llvm::APFloat::IEEEquad;
// AArch64 backend supports 64-bit operations at the moment. In principle
@@ -3427,6 +3431,13 @@ public:
if (BigEndian)
Builder.defineMacro("__AARCH_BIG_ENDIAN");
+ if (getTriple().getOS() == llvm::Triple::NetBSD) {
+ if (BigEndian)
+ Builder.defineMacro("__BIG_ENDIAN__");
+ else
+ Builder.defineMacro("__LITTLE_ENDIAN__");
+ }
+
if (FPU == NeonMode) {
Builder.defineMacro("__ARM_NEON");
// 64-bit NEON supports half, single and double precision operations.
More information about the cfe-commits
mailing list