diff options
author | Bob Wilson <bob.wilson@apple.com> | 2013-06-18 05:36:04 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2013-06-18 05:36:04 +0000 |
commit | 87b3a189efef357fafde1fbf9b90e00019a9f620 (patch) | |
tree | 9dbc364f0e0605bb0537755d80ca2b402951361d /clang/lib/Basic/Targets.cpp | |
parent | 430ee42185e5d4ae3106ad8a823e3483696d0da3 (diff) | |
download | bcm5719-llvm-87b3a189efef357fafde1fbf9b90e00019a9f620.tar.gz bcm5719-llvm-87b3a189efef357fafde1fbf9b90e00019a9f620.zip |
size_t on Darwin AAPCS targets is "unsigned long". <rdar://problem/14136459>
Some embedded targets use ARM's AAPCS with iOS header files that define size_t
as unsigned long, which conflicts with the usual AAPCS definition of size_t
as unsigned int.
llvm-svn: 184171
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 4e2d223c6bf..744a437fde5 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -3642,6 +3642,9 @@ public: // FIXME: Override "preferred align" for double and long long. } else if (Name == "aapcs" || Name == "aapcs-vfp") { + // size_t is unsigned long on Darwin. + if (getTriple().isOSDarwin()) + SizeType = UnsignedLong; IsAAPCS = true; // FIXME: Enumerated types are variable width in straight AAPCS. } else if (Name == "aapcs-linux") { |