diff options
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Driver/windows-arm-minimal-arch.c | 5 | ||||
| -rw-r--r-- | clang/test/Parser/arm-windows-calling-convention-handling.c | 10 | ||||
| -rw-r--r-- | clang/test/Preprocessor/woa-defaults.c | 33 | 
3 files changed, 48 insertions, 0 deletions
| diff --git a/clang/test/Driver/windows-arm-minimal-arch.c b/clang/test/Driver/windows-arm-minimal-arch.c new file mode 100644 index 00000000000..cf55b8f99d0 --- /dev/null +++ b/clang/test/Driver/windows-arm-minimal-arch.c @@ -0,0 +1,5 @@ +// RUN: not %clang -target thumbv5-windows -mcpu=arm10tdmi %s -o /dev/null 2>&1 \ +// RUN:   | FileCheck %s + +// CHECK: error: the target architecture 'thumbv5' is not supported by the target 'thumbv5--windows-msvc' + diff --git a/clang/test/Parser/arm-windows-calling-convention-handling.c b/clang/test/Parser/arm-windows-calling-convention-handling.c new file mode 100644 index 00000000000..7717aada53a --- /dev/null +++ b/clang/test/Parser/arm-windows-calling-convention-handling.c @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -triple thumbv7-windows -fms-compatibility -fsyntax-only -verify %s + +int __cdecl cdecl(int a, int b, int c, int d) { // expected-warning {{calling convention '__cdecl' ignored for this target}} +  return a + b + c + d; +} + +float __stdcall stdcall(float a, float b, float c, float d) { // expected-warning {{calling convention '__stdcall' ignored for this target}} +  return a + b + c + d; +} + diff --git a/clang/test/Preprocessor/woa-defaults.c b/clang/test/Preprocessor/woa-defaults.c new file mode 100644 index 00000000000..6eab3b96f41 --- /dev/null +++ b/clang/test/Preprocessor/woa-defaults.c @@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -dM -triple armv7-windows -E %s | FileCheck %s +// RUN: %clang_cc1 -dM -fno-signed-char -triple armv7-windows -E %s \ +// RUN:   | FileCheck %s -check-prefix CHECK-UNSIGNED-CHAR + +// CHECK: #define _INTEGRAL_MAX_BITS 64 +// CHECK: #define _M_ARM 7 +// CHECK: #define _M_ARMT _M_ARM +// CHECK: #define _M_ARM_FP 31 +// CHECK: #define _M_ARM_NT 1 +// 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 __SIZEOF_DOUBLE__ 8 +// CHECK: #define __SIZEOF_FLOAT__ 4 +// CHECK: #define __SIZEOF_INT__ 4 +// CHECK: #define __SIZEOF_LONG_DOUBLE__ 8 +// CHECK: #define __SIZEOF_LONG_LONG__ 8 +// CHECK: #define __SIZEOF_LONG__ 4 +// CHECK: #define __SIZEOF_POINTER__ 4 +// CHECK: #define __SIZEOF_PTRDIFF_T__ 4 +// CHECK: #define __SIZEOF_SHORT__ 2 +// CHECK: #define __SIZEOF_SIZE_T__ 4 +// CHECK: #define __SIZEOF_WCHAR_T__ 2 +// CHECK: #define __SIZEOF_WINT_T__ 4 + +// CHECK-NOT: __THUMB_INTERWORK__ +// CHECK-NOT: __ARM_EABI__ +// CHECK-NOT: _CHAR_UNSIGNED + +// CHECK-UNSIGNED-CHAR: #define _CHAR_UNSIGNED 1 | 

