Ben Langmuir | 4b8a9e9 | 2014-08-12 16:42:33 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
| 2 | // RUN: rm -rf %t.mcp |
| 3 | // RUN: mkdir -p %t |
| 4 | // RUN: cp -r %S/Inputs/AddRemovePrivate.framework %t/AddRemovePrivate.framework |
| 5 | |
| 6 | // Build with module.private.modulemap |
Bruno Cardoso Lopes | 29729919 | 2017-12-22 02:53:30 +0000 | [diff] [blame] | 7 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify -DP -Wno-private-module |
Ben Langmuir | 4b8a9e9 | 2014-08-12 16:42:33 +0000 | [diff] [blame] | 8 | // RUN: cp %t.mcp/AddRemovePrivate.pcm %t/with.pcm |
| 9 | |
| 10 | // Build without module.private.modulemap |
| 11 | // RUN: rm %t/AddRemovePrivate.framework/Modules/module.private.modulemap |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 12 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify |
Ben Langmuir | 4b8a9e9 | 2014-08-12 16:42:33 +0000 | [diff] [blame] | 13 | // RUN: not diff %t.mcp/AddRemovePrivate.pcm %t/with.pcm |
| 14 | // RUN: cp %t.mcp/AddRemovePrivate.pcm %t/without.pcm |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 15 | // RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -DP 2>&1 | FileCheck %s |
Ben Langmuir | 4b8a9e9 | 2014-08-12 16:42:33 +0000 | [diff] [blame] | 16 | // CHECK: no submodule named 'Private' |
| 17 | |
| 18 | // Build with module.private.modulemap (again) |
| 19 | // RUN: cp %S/Inputs/AddRemovePrivate.framework/Modules/module.private.modulemap %t/AddRemovePrivate.framework/Modules/module.private.modulemap |
Bruno Cardoso Lopes | 29729919 | 2017-12-22 02:53:30 +0000 | [diff] [blame] | 20 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify -DP -Wno-private-module |
Ben Langmuir | 4b8a9e9 | 2014-08-12 16:42:33 +0000 | [diff] [blame] | 21 | // RUN: not diff %t.mcp/AddRemovePrivate.pcm %t/without.pcm |
| 22 | |
| 23 | // expected-no-diagnostics |
| 24 | |
| 25 | @import AddRemovePrivate; |
| 26 | #ifdef P |
| 27 | @import AddRemovePrivate.Private; |
| 28 | #endif |