aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/TargetInfo.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2008-11-02 02:43:55 +0000
committerEli Friedman <eli.friedman@gmail.com>2008-11-02 02:43:55 +0000
commitf509d73ecf2c996e257f1a4e23c1282396b0a847 (patch)
treec98f0531098d466785f1fd1fe271e6124e42e513 /lib/Basic/TargetInfo.cpp
parentc979a9b066d998d73fb3a5ae293b7bbf78576e47 (diff)
More fallout from r58501: primary fix is some more corrections to make
the types for size_t and ptrdiff_t more accurate. I think all of these are correct, but please compare the defines for __PTRDIFF_TYPE__ and __SIZE_TYPE__ to gcc to double-check; this particularly applies to those on BSD variants, since I'm not sure what they do here; I assume here that they're the same as on Linux. Fixes wchar_t to be "int", not "unsigned int" (which I think is correct on everything but Windows). Fixes ptrdiff_t to be "int" rather than "short" on PIC16; "short" is an somewhat strange choice because it normally gets promoted, and it's not consistent with the choice for size_t. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58556 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/TargetInfo.cpp')
-rw-r--r--lib/Basic/TargetInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp
index 522a09dbb1..44150821a8 100644
--- a/lib/Basic/TargetInfo.cpp
+++ b/lib/Basic/TargetInfo.cpp
@@ -35,10 +35,10 @@ TargetInfo::TargetInfo(const std::string &T) : Triple(T) {
LongDoubleWidth = 64;
LongDoubleAlign = 64;
SizeType = UnsignedLong;
+ PtrDiffType = SignedLong;
IntMaxType = SignedLongLong;
UIntMaxType = UnsignedLongLong;
- PtrDiffType = SignedLongLong;
- WCharType = UnsignedInt;
+ WCharType = SignedInt;
FloatFormat = &llvm::APFloat::IEEEsingle;
DoubleFormat = &llvm::APFloat::IEEEdouble;
LongDoubleFormat = &llvm::APFloat::IEEEdouble;