diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-10-28 06:00:43 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-10-28 06:00:43 +0000 |
commit | 1924b24aca17acf8b4b3d40fd393b903e66e68df (patch) | |
tree | a83d8817ffd949762c4e5afe030d3e1a4c49287a /clang/lib/Basic/Targets/ARM.cpp | |
parent | f8b92661b8959cd015d9904b167c010749c2b0d7 (diff) | |
download | bcm5719-llvm-1924b24aca17acf8b4b3d40fd393b903e66e68df.tar.gz bcm5719-llvm-1924b24aca17acf8b4b3d40fd393b903e66e68df.zip |
Basic: improve coverage for Darwin targets and fix ABI
The existing coverage for the Darwin targets wasn't enough to catch all
the variations. Improve the coverage a bit further and fix a few cases
for Darwin targets.
llvm-svn: 316826
Diffstat (limited to 'clang/lib/Basic/Targets/ARM.cpp')
-rw-r--r-- | clang/lib/Basic/Targets/ARM.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/clang/lib/Basic/Targets/ARM.cpp b/clang/lib/Basic/Targets/ARM.cpp index bbbe75b4837..def490b99ff 100644 --- a/clang/lib/Basic/Targets/ARM.cpp +++ b/clang/lib/Basic/Targets/ARM.cpp @@ -214,18 +214,23 @@ ARMTargetInfo::ARMTargetInfo(const llvm::Triple &Triple, bool IsOpenBSD = Triple.getOS() == llvm::Triple::OpenBSD; bool IsNetBSD = Triple.getOS() == llvm::Triple::NetBSD; - PtrDiffType = IntPtrType = - (Triple.isOSDarwin() || IsOpenBSD || IsNetBSD) ? SignedLong : SignedInt; - // FIXME: the isOSBinFormatMachO is a workaround for identifying a Darwin-like // environment where size_t is `unsigned long` rather than `unsigned int` + + PtrDiffType = IntPtrType = + (Triple.isOSDarwin() || Triple.isOSBinFormatMachO() || IsOpenBSD || + IsNetBSD) + ? SignedLong + : SignedInt; + SizeType = (Triple.isOSDarwin() || Triple.isOSBinFormatMachO() || IsOpenBSD || IsNetBSD) ? UnsignedLong : UnsignedInt; // ptrdiff_t is inconsistent on Darwin - if (Triple.isOSDarwin() && !Triple.isWatchABI()) + if ((Triple.isOSDarwin() || Triple.isOSBinFormatMachO()) && + !Triple.isWatchABI()) PtrDiffType = SignedInt; // Cache arch related info. |