2014-08-13 00:42:33 +08:00
|
|
|
// RUN: rm -rf %t
|
|
|
|
// RUN: rm -rf %t.mcp
|
|
|
|
// RUN: mkdir -p %t
|
|
|
|
// RUN: cp -r %S/Inputs/AddRemovePrivate.framework %t/AddRemovePrivate.framework
|
|
|
|
|
|
|
|
// Build with module.private.modulemap
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify -DP
|
2014-08-13 00:42:33 +08:00
|
|
|
// RUN: cp %t.mcp/AddRemovePrivate.pcm %t/with.pcm
|
|
|
|
|
|
|
|
// Build without module.private.modulemap
|
|
|
|
// RUN: rm %t/AddRemovePrivate.framework/Modules/module.private.modulemap
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify
|
2014-08-13 00:42:33 +08:00
|
|
|
// RUN: not diff %t.mcp/AddRemovePrivate.pcm %t/with.pcm
|
|
|
|
// RUN: cp %t.mcp/AddRemovePrivate.pcm %t/without.pcm
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -DP 2>&1 | FileCheck %s
|
2014-08-13 00:42:33 +08:00
|
|
|
// CHECK: no submodule named 'Private'
|
|
|
|
|
|
|
|
// Build with module.private.modulemap (again)
|
|
|
|
// RUN: cp %S/Inputs/AddRemovePrivate.framework/Modules/module.private.modulemap %t/AddRemovePrivate.framework/Modules/module.private.modulemap
|
2015-06-16 08:08:24 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify -DP
|
2014-08-13 00:42:33 +08:00
|
|
|
// RUN: not diff %t.mcp/AddRemovePrivate.pcm %t/without.pcm
|
|
|
|
|
|
|
|
// expected-no-diagnostics
|
|
|
|
|
|
|
|
@import AddRemovePrivate;
|
|
|
|
#ifdef P
|
|
|
|
@import AddRemovePrivate.Private;
|
|
|
|
#endif
|