r316042 - Basic: fix `__INTPTR_TYPE__` for Windows ARM
Saleem Abdulrasool via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 17 15:49:53 PDT 2017
Author: compnerd
Date: Tue Oct 17 15:49:53 2017
New Revision: 316042
URL: http://llvm.org/viewvc/llvm-project?rev=316042&view=rev
Log:
Basic: fix `__INTPTR_TYPE__` for Windows ARM
The `IntPtrType` for Windows ARM should be `int` as per MSVC. Adjust
the type accordingly.
Modified:
cfe/trunk/lib/Basic/Targets/ARM.cpp
cfe/trunk/test/Preprocessor/woa-defaults.c
Modified: cfe/trunk/lib/Basic/Targets/ARM.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/ARM.cpp?rev=316042&r1=316041&r2=316042&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets/ARM.cpp (original)
+++ cfe/trunk/lib/Basic/Targets/ARM.cpp Tue Oct 17 15:49:53 2017
@@ -923,6 +923,7 @@ WindowsARMTargetInfo::WindowsARMTargetIn
const TargetOptions &Opts)
: WindowsTargetInfo<ARMleTargetInfo>(Triple, Opts), Triple(Triple) {
SizeType = UnsignedInt;
+ IntPtrType = SignedInt;
}
void WindowsARMTargetInfo::getVisualStudioDefines(const LangOptions &Opts,
Modified: cfe/trunk/test/Preprocessor/woa-defaults.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/woa-defaults.c?rev=316042&r1=316041&r2=316042&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/woa-defaults.c (original)
+++ cfe/trunk/test/Preprocessor/woa-defaults.c Tue Oct 17 15:49:53 2017
@@ -10,9 +10,12 @@
// CHECK: #define _M_THUMB _M_ARM
// CHECK: #define _WIN32 1
+
// CHECK: #define __ARM_PCS 1
// CHECK: #define __ARM_PCS_VFP 1
// CHECK: #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
+// CHECK: #define __INTPTR_TYPE__ int
+// CHECK: #define __PTRDIFF_TYPE__ int
// CHECK: #define __SIZEOF_DOUBLE__ 8
// CHECK: #define __SIZEOF_FLOAT__ 4
// CHECK: #define __SIZEOF_INT__ 4
@@ -25,6 +28,8 @@
// CHECK: #define __SIZEOF_SIZE_T__ 4
// CHECK: #define __SIZEOF_WCHAR_T__ 2
// CHECK: #define __SIZEOF_WINT_T__ 4
+// CHECK: #define __SIZE_TYPE__ unsigned int
+// CHECK: #define __UINTPTR_TYPE__ unsigned int
// CHECK-NOT: __THUMB_INTERWORK__
// CHECK-NOT: __ARM_EABI__
More information about the cfe-commits
mailing list