summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/init.c
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-05-28 04:36:18 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-05-28 04:36:18 +0000
commitae1ed0edfe688b50aeaf3a8a9b0da6fe69b67eb9 (patch)
treec4c5e7fff984a20902c8ac6f91a0fb5f3cdcbd91 /clang/test/Preprocessor/init.c
parent424a5dbc73ad8dc932a2544864535e9d0117d05d (diff)
downloadbcm5719-llvm-ae1ed0edfe688b50aeaf3a8a9b0da6fe69b67eb9.tar.gz
bcm5719-llvm-ae1ed0edfe688b50aeaf3a8a9b0da6fe69b67eb9.zip
[Basic] Define __declspec for cygwin
Cygwin (and MinGW) targets define __declspec to __attribute__ unless -fms-extensions is specified. It turns out that cygwin headers rely on the existence of this macro. llvm-svn: 238394
Diffstat (limited to 'clang/test/Preprocessor/init.c')
-rw-r--r--clang/test/Preprocessor/init.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c
index 91ec4d77b5c..c5dff25f042 100644
--- a/clang/test/Preprocessor/init.c
+++ b/clang/test/Preprocessor/init.c
@@ -2793,6 +2793,12 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=i386-netbsd6 -target-feature +sse2 < /dev/null | FileCheck -check-prefix I386-NETBSD6-SSE %s
// I386-NETBSD6-SSE:#define __FLT_EVAL_METHOD__ 1
+// RUN: %clang_cc1 -E -dM -triple=i686-pc-mingw32 < /dev/null | FileCheck -check-prefix I386-DECLSPEC %s
+// RUN: %clang_cc1 -E -dM -fms-extensions -triple=i686-pc-mingw32 < /dev/null | FileCheck -check-prefix I386-DECLSPEC %s
+// RUN: %clang_cc1 -E -dM -triple=i686-unknown-cygwin < /dev/null | FileCheck -check-prefix I386-DECLSPEC %s
+// RUN: %clang_cc1 -E -dM -fms-extensions -triple=i686-unknown-cygwin < /dev/null | FileCheck -check-prefix I386-DECLSPEC %s
+// I386-DECLSPEC: #define __declspec
+
//
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips-none-none < /dev/null | FileCheck -check-prefix MIPS32BE %s
//
@@ -8346,6 +8352,10 @@
// PS4:#define __x86_64 1
// PS4:#define __x86_64__ 1
//
+// RUN: %clang_cc1 -E -dM -triple=x86_64-pc-mingw32 < /dev/null | FileCheck -check-prefix X86-64-DECLSPEC %s
+// RUN: %clang_cc1 -E -dM -fms-extensions -triple=x86_64-unknown-mingw32 < /dev/null | FileCheck -check-prefix X86-64-DECLSPEC %s
+// X86-64-DECLSPEC: #define __declspec
+//
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=sparc64-none-none < /dev/null | FileCheck -check-prefix SPARCV9 %s
// SPARCV9:#define __INT64_TYPE__ long int
// SPARCV9:#define __INTMAX_C_SUFFIX__ L
OpenPOWER on IntegriCloud