]> granicus.if.org Git - clang/commitdiff
Basic: fix `__INTPTR_TYPE__` for Windows ARM
authorSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 17 Oct 2017 22:49:53 +0000 (22:49 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Tue, 17 Oct 2017 22:49:53 +0000 (22:49 +0000)
The `IntPtrType` for Windows ARM should be `int` as per MSVC.  Adjust
the type accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316042 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets/ARM.cpp
test/Preprocessor/woa-defaults.c

index 92685fcd21ca83df4e60bbfee32622b4b6507b5a..83fd9690caeaa401c7ec87ff28b62051ed486a62 100644 (file)
@@ -923,6 +923,7 @@ 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,
index 6eab3b96f41458e507b534626c9029e1285436ec..4eef863b23a1408216ca87fae4793240679eced1 100644 (file)
 // 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__