summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-08-05 11:07:26 +0000
committerTim Northover <tnorthover@apple.com>2014-08-05 11:07:26 +0000
commit00853e5b6ac9a98282cded783f363c46f07a0c91 (patch)
tree155f4d36fe716845bc41f16fe45b0998eb4f6d82 /clang/lib
parent183771bd8ef3c0fa94b346d3e9a03aeaa1a5093e (diff)
downloadbcm5719-llvm-00853e5b6ac9a98282cded783f363c46f07a0c91.tar.gz
bcm5719-llvm-00853e5b6ac9a98282cded783f363c46f07a0c91.zip
MachO: set sizeof result type to what embedded headers expect.
Embedded systems seem to have inherited Darwin's choise of "unsigned long" for size_t (via a bunch of headers), so we should respect that. rdar://problem/17872787 llvm-svn: 214854
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Basic/Targets.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index 034bb07b05b..eae369889ce 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -3596,8 +3596,8 @@ class ARMTargetInfo : public TargetInfo {
DoubleAlign = LongLongAlign = LongDoubleAlign = SuitableAlign = 64;
const llvm::Triple &T = getTriple();
- // size_t is unsigned long on Darwin and NetBSD.
- if (T.isOSDarwin() || T.getOS() == llvm::Triple::NetBSD)
+ // size_t is unsigned long on MachO-derived environments and NetBSD.
+ if (T.isOSBinFormatMachO() || T.getOS() == llvm::Triple::NetBSD)
SizeType = UnsignedLong;
else
SizeType = UnsignedInt;
OpenPOWER on IntegriCloud