Merging r196114:
------------------------------------------------------------------------
r196114 | joerg | 2013-12-02 08:09:34 -0800 (Mon, 02 Dec 2013) | 2 lines
NetBSD uses long derived size_t / ssize_t in all ARM ABIs.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196134 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index c087a1e..7bb6b40 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -3706,15 +3706,17 @@
: TargetInfo(Triple), ABI("aapcs-linux"), CPU("arm1136j-s"),
FPMath(FP_Default), IsAAPCS(true) {
BigEndian = false;
- SizeType = UnsignedInt;
- PtrDiffType = SignedInt;
switch (getTriple().getOS()) {
case llvm::Triple::NetBSD:
+ SizeType = UnsignedLong;
+ PtrDiffType = SignedLong;
WCharType = SignedInt;
break;
default:
// AAPCS 7.1.1, ARM-Linux ABI 2.4: type of wchar_t is unsigned int.
WCharType = UnsignedInt;
+ SizeType = UnsignedInt;
+ PtrDiffType = SignedInt;
break;
}