diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-13 20:44:41 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-13 20:44:41 +0000 |
commit | 1c7e0472f5683a8ade62285f366637050cf113e5 (patch) | |
tree | 5cce234698b9cc8c665aebdc1a29bea9843b652a /test/Modules | |
parent | 221d5a5005b3dbde50b8b0a40bb5c5e6da8c1173 (diff) |
When building a module on-demand, clear out the "non-modular" language
and preprocessor options (such as macro definitions) first.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139638 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules')
-rw-r--r-- | test/Modules/Inputs/Module.framework/Headers/Module.h | 6 | ||||
-rw-r--r-- | test/Modules/on-demand-build.m | 2 |
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() { |