aboutsummaryrefslogtreecommitdiff
path: root/test/Modules/on-demand-macros.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/Modules/on-demand-macros.m')
-rw-r--r--test/Modules/on-demand-macros.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Modules/on-demand-macros.m b/test/Modules/on-demand-macros.m
new file mode 100644
index 000000000000..96abb2331f10
--- /dev/null
+++ b/test/Modules/on-demand-macros.m
@@ -0,0 +1,13 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodule-cache-path %t -F %S/Inputs -DFOO_RETURNS_INT_PTR -verify %s
+// RUN: %clang_cc1 -fmodule-cache-path %t -F %S/Inputs -verify %s
+
+__import_module__ CmdLine;
+
+void test() {
+#ifdef FOO_RETURNS_INT_PTR
+ int *ip = foo();
+#else
+ float *fp = foo();
+#endif
+}