diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-10-20 04:11:28 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-10-20 04:11:28 +0000 |
commit | e5696580aa9767d6baa0db996855a7b3a5171f8c (patch) | |
tree | b29280be577a03c47ad880b6dffdf23a9a482eaa /clang/lib/Basic/Targets/ARM.cpp | |
parent | 716a1429409517d0d2ad6d20d20519bfe1bba1f9 (diff) | |
download | bcm5719-llvm-e5696580aa9767d6baa0db996855a7b3a5171f8c.tar.gz bcm5719-llvm-e5696580aa9767d6baa0db996855a7b3a5171f8c.zip |
Basic: restore {,u}intptr_t on NetBSD/ARM
NetBSD uses `long int` for `intptr_t` on ARM. This was changed in SVN
r316046, referenced against other compilers. However, NetBSD's
reference was incorrect as the current clang behaviour is more
up-to-date. Restore the original behaviour for that target.
llvm-svn: 316204
Diffstat (limited to 'clang/lib/Basic/Targets/ARM.cpp')
-rw-r--r-- | clang/lib/Basic/Targets/ARM.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Basic/Targets/ARM.cpp b/clang/lib/Basic/Targets/ARM.cpp index 992cfbde364..1b236dd2208 100644 --- a/clang/lib/Basic/Targets/ARM.cpp +++ b/clang/lib/Basic/Targets/ARM.cpp @@ -236,9 +236,10 @@ ARMTargetInfo::ARMTargetInfo(const llvm::Triple &Triple, break; } - IntPtrType = (Triple.isOSDarwin() || Triple.getOS() == llvm::Triple::OpenBSD) - ? SignedLong - : SignedInt; + bool IsOpenBSD = Triple.getOS() == llvm::Triple::OpenBSD; + bool IsNetBSD = Triple.getOS() == llvm::Triple::NetBSD; + IntPtrType = + (Triple.isOSDarwin() || IsOpenBSD || IsNetBSD) ? SignedLong : SignedInt; // Cache arch related info. setArchInfo(); |