1*0a6a1f1dSLionel Sambuc// RUN: rm -rf %t 2*0a6a1f1dSLionel Sambuc// RUN: rm -rf %t.mcp 3*0a6a1f1dSLionel Sambuc// RUN: mkdir -p %t 4*0a6a1f1dSLionel Sambuc// RUN: cp -r %S/Inputs/AddRemovePrivate.framework %t/AddRemovePrivate.framework 5*0a6a1f1dSLionel Sambuc 6*0a6a1f1dSLionel Sambuc// Build with module.private.modulemap 7*0a6a1f1dSLionel Sambuc// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify -DP 8*0a6a1f1dSLionel Sambuc// RUN: cp %t.mcp/AddRemovePrivate.pcm %t/with.pcm 9*0a6a1f1dSLionel Sambuc 10*0a6a1f1dSLionel Sambuc// Build without module.private.modulemap 11*0a6a1f1dSLionel Sambuc// RUN: rm %t/AddRemovePrivate.framework/Modules/module.private.modulemap 12*0a6a1f1dSLionel Sambuc// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify 13*0a6a1f1dSLionel Sambuc// RUN: not diff %t.mcp/AddRemovePrivate.pcm %t/with.pcm 14*0a6a1f1dSLionel Sambuc// RUN: cp %t.mcp/AddRemovePrivate.pcm %t/without.pcm 15*0a6a1f1dSLionel Sambuc// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -DP 2>&1 | FileCheck %s 16*0a6a1f1dSLionel Sambuc// CHECK: no submodule named 'Private' 17*0a6a1f1dSLionel Sambuc 18*0a6a1f1dSLionel Sambuc// Build with module.private.modulemap (again) 19*0a6a1f1dSLionel Sambuc// RUN: cp %S/Inputs/AddRemovePrivate.framework/Modules/module.private.modulemap %t/AddRemovePrivate.framework/Modules/module.private.modulemap 20*0a6a1f1dSLionel Sambuc// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t.mcp -fdisable-module-hash -F %t %s -verify -DP 21*0a6a1f1dSLionel Sambuc// RUN: not diff %t.mcp/AddRemovePrivate.pcm %t/without.pcm 22*0a6a1f1dSLionel Sambuc 23*0a6a1f1dSLionel Sambuc// expected-no-diagnostics 24*0a6a1f1dSLionel Sambuc 25*0a6a1f1dSLionel Sambuc@import AddRemovePrivate; 26*0a6a1f1dSLionel Sambuc#ifdef P 27*0a6a1f1dSLionel Sambuc@import AddRemovePrivate.Private; 28*0a6a1f1dSLionel Sambuc#endif 29