diff options
| author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-10-18 00:00:50 +0000 |
|---|---|---|
| committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-10-18 00:00:50 +0000 |
| commit | 8d799f8ef9817ff1f709be242811c19fa2b42e97 (patch) | |
| tree | 6d746fb0fc5957a4a6ecacce82998b34be986c1b /clang/lib/Basic | |
| parent | c4fcc189d2f7e8bfdab0d8da576ff6ce0adb1d23 (diff) | |
| download | bcm5719-llvm-8d799f8ef9817ff1f709be242811c19fa2b42e97.tar.gz bcm5719-llvm-8d799f8ef9817ff1f709be242811c19fa2b42e97.zip | |
Basic: fix __{,U}INTPTR_TYPE__ on ARM
Darwin and OpenBSD are the only platforms which use `long int` for
`__INTPTR_TYPE__`. The other platforms use `int` in 32-bit, and `long
int` on 64-bit (except for VMS and Windows which are LLP64). Adjust the
type definitions to match the platform definitions. We now generate the
same definition as GCC on all the targets.
llvm-svn: 316046
Diffstat (limited to 'clang/lib/Basic')
| -rw-r--r-- | clang/lib/Basic/Targets/ARM.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Basic/Targets/ARM.cpp b/clang/lib/Basic/Targets/ARM.cpp index 83fd9690cae..992cfbde364 100644 --- a/clang/lib/Basic/Targets/ARM.cpp +++ b/clang/lib/Basic/Targets/ARM.cpp @@ -236,6 +236,10 @@ ARMTargetInfo::ARMTargetInfo(const llvm::Triple &Triple, break; } + IntPtrType = (Triple.isOSDarwin() || Triple.getOS() == llvm::Triple::OpenBSD) + ? SignedLong + : SignedInt; + // Cache arch related info. setArchInfo(); @@ -923,7 +927,6 @@ WindowsARMTargetInfo::WindowsARMTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) : WindowsTargetInfo<ARMleTargetInfo>(Triple, Opts), Triple(Triple) { SizeType = UnsignedInt; - IntPtrType = SignedInt; } void WindowsARMTargetInfo::getVisualStudioDefines(const LangOptions &Opts, |

