aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Modules/Inputs/Module.framework/Headers/Module.h6
-rw-r--r--test/Modules/on-demand-build.m2
2 files changed, 6 insertions, 2 deletions
diff --git a/test/Modules/Inputs/Module.framework/Headers/Module.h b/test/Modules/Inputs/Module.framework/Headers/Module.h
index 1d9278b0ca..af403c8395 100644
--- a/test/Modules/Inputs/Module.framework/Headers/Module.h
+++ b/test/Modules/Inputs/Module.framework/Headers/Module.h
@@ -1,6 +1,10 @@
const char *getModuleVersion(void);
+#ifdef FOO
+# error Module should have been built without -DFOO
+#endif
+
@interface Module
-+(const char *)version;
++(const char *)version; // retrieve module version
@end
diff --git a/test/Modules/on-demand-build.m b/test/Modules/on-demand-build.m
index 2191499cec..42b8533a9a 100644
--- a/test/Modules/on-demand-build.m
+++ b/test/Modules/on-demand-build.m
@@ -1,6 +1,6 @@
// RUN: mkdir -p %t
// RUN: rm -f %t/Module.pcm
-// RUN: %clang_cc1 -fmodule-cache-path %t -F %S/Inputs -verify %s
+// RUN: %clang_cc1 -fmodule-cache-path %t -F %S/Inputs -DFOO -verify %s
__import_module__ Module;
void test_getModuleVersion() {