aboutsummaryrefslogtreecommitdiff
path: root/test/Modules/requires-gnuinlineasm.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/Modules/requires-gnuinlineasm.m')
-rw-r--r--test/Modules/requires-gnuinlineasm.m16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Modules/requires-gnuinlineasm.m b/test/Modules/requires-gnuinlineasm.m
new file mode 100644
index 000000000000..80b1b18d0742
--- /dev/null
+++ b/test/Modules/requires-gnuinlineasm.m
@@ -0,0 +1,16 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules \
+// RUN: -fimplicit-module-maps -F %S/Inputs/GNUAsm %s \
+// RUN: -fno-gnu-inline-asm -DNO_ASM_INLINE -verify
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules \
+// RUN: -fimplicit-module-maps -F %S/Inputs/GNUAsm %s \
+// RUN: -DASM_INLINE -verify
+
+#ifdef NO_ASM_INLINE
+@import NeedsGNUInlineAsm.Asm; // expected-error{{module 'NeedsGNUInlineAsm.Asm' requires feature 'gnuinlineasm'}}
+#endif
+
+#ifdef ASM_INLINE
+@import NeedsGNUInlineAsm.Asm; // expected-no-diagnostics
+#endif