Skip to content
Snippets Groups Projects
Commit f4502ab5 authored by Saleem Abdulrasool's avatar Saleem Abdulrasool
Browse files

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316204 91177308-0d34-0410-b5e6-96231b3b80d8
parent 53df1a50
No related branches found
No related tags found
Loading
......@@ -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();
......
......@@ -2446,10 +2446,10 @@
// ARM-NETBSD:#define __INTMAX_MAX__ 9223372036854775807LL
// ARM-NETBSD:#define __INTMAX_TYPE__ long long int
// ARM-NETBSD:#define __INTMAX_WIDTH__ 64
// ARM-NETBSD:#define __INTPTR_FMTd__ "d"
// ARM-NETBSD:#define __INTPTR_FMTi__ "i"
// ARM-NETBSD:#define __INTPTR_MAX__ 2147483647
// ARM-NETBSD:#define __INTPTR_TYPE__ int
// ARM-NETBSD:#define __INTPTR_FMTd__ "ld"
// ARM-NETBSD:#define __INTPTR_FMTi__ "li"
// ARM-NETBSD:#define __INTPTR_MAX__ 2147483647L
// ARM-NETBSD:#define __INTPTR_TYPE__ long int
// ARM-NETBSD:#define __INTPTR_WIDTH__ 32
// ARM-NETBSD:#define __INT_FAST16_FMTd__ "hd"
// ARM-NETBSD:#define __INT_FAST16_FMTi__ "hi"
......@@ -2541,8 +2541,8 @@
// ARM-NETBSD:#define __UINTMAX_MAX__ 18446744073709551615ULL
// ARM-NETBSD:#define __UINTMAX_TYPE__ long long unsigned int
// ARM-NETBSD:#define __UINTMAX_WIDTH__ 64
// ARM-NETBSD:#define __UINTPTR_MAX__ 4294967295U
// ARM-NETBSD:#define __UINTPTR_TYPE__ unsigned int
// ARM-NETBSD:#define __UINTPTR_MAX__ 4294967295UL
// ARM-NETBSD:#define __UINTPTR_TYPE__ long unsigned int
// ARM-NETBSD:#define __UINTPTR_WIDTH__ 32
// ARM-NETBSD:#define __UINT_FAST16_MAX__ 65535
// ARM-NETBSD:#define __UINT_FAST16_TYPE__ unsigned short
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment