Fix an ABI problem with ptrdiff_t and intptr_t on PPC32
ptrdiff_t on PPC32 on Linux, etc. should be int not long.
This does not matter for C, but it does matter for C++ because of
name mangling.
The preprocessor test has been changed accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151935 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index ac8c355..a7c4f22 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -865,6 +865,8 @@
case llvm::Triple::FreeBSD:
case llvm::Triple::NetBSD:
SizeType = UnsignedInt;
+ PtrDiffType = SignedInt;
+ IntPtrType = SignedInt;
break;
default:
break;