blob: dc73a096c8079d66a5c171d1d64d69ddb3673a1b [file] [log] [blame]
Ben Langmuir4b8a9e92014-08-12 16:42:33 +00001// 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
Richard Smith47972af2015-06-16 00:08:24 +00007// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify -DP
Ben Langmuir4b8a9e92014-08-12 16:42:33 +00008// 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 Smith47972af2015-06-16 00:08:24 +000012// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify
Ben Langmuir4b8a9e92014-08-12 16:42:33 +000013// RUN: not diff %t.mcp/AddRemovePrivate.pcm %t/with.pcm
14// RUN: cp %t.mcp/AddRemovePrivate.pcm %t/without.pcm
Richard Smith47972af2015-06-16 00:08:24 +000015// 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 Langmuir4b8a9e92014-08-12 16:42:33 +000016// 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
Richard Smith47972af2015-06-16 00:08:24 +000020// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify -DP
Ben Langmuir4b8a9e92014-08-12 16:42:33 +000021// 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