summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/has_attribute.c
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2014-01-09 22:57:44 +0000
committerAaron Ballman <aaron@aaronballman.com>2014-01-09 22:57:44 +0000
commit0fa06d879ace8a2c934590a8f4e461875bd2745c (patch)
tree7b82dcb898402d0e534b603c70a6ffaa433edfdf /clang/test/Preprocessor/has_attribute.c
parentab7691c4ce72faf49e14fe715ec608f236742e24 (diff)
downloadbcm5719-llvm-0fa06d879ace8a2c934590a8f4e461875bd2745c.tar.gz
bcm5719-llvm-0fa06d879ace8a2c934590a8f4e461875bd2745c.zip
__has_attribute now understands target-specific attributes. So when you ask whether an ARM target has the "interrupt" attribute, it will return true for ARM and MSP430 targets, and false for others.
llvm-svn: 198897
Diffstat (limited to 'clang/test/Preprocessor/has_attribute.c')
-rw-r--r--clang/test/Preprocessor/has_attribute.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/clang/test/Preprocessor/has_attribute.c b/clang/test/Preprocessor/has_attribute.c
index 555c2b3f9e2..5fe060e68d3 100644
--- a/clang/test/Preprocessor/has_attribute.c
+++ b/clang/test/Preprocessor/has_attribute.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -E %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple arm-unknown-linux -E %s -o - | FileCheck %s
// CHECK: always_inline
#if __has_attribute(always_inline)
@@ -38,3 +38,13 @@ int has_something_we_dont_have();
#if !__has_attribute(volatile)
int has_no_volatile_attribute();
#endif
+
+// CHECK: has_arm_interrupt
+#if __has_attribute(interrupt)
+ int has_arm_interrupt();
+#endif
+
+// CHECK: does_not_have_dllexport
+#if !__has_attribute(dllexport)
+ int does_not_have_dllexport();
+#endif
OpenPOWER on IntegriCloud