
We used to advertise private modules to be declared as submodules (Foo.Private). This has proven to not scale well since private headers might carry several dependencies, introducing unwanted content into the main module and often causing dep cycles. Change the canonical way to name it to Foo_Private, forcing private modules as top level ones, and provide warnings under -Wprivate-module to suggest fixes for other private naming. Update documentation to reflect that. rdar://problem/31173501 llvm-svn: 321337
20 lines
884 B
Objective-C
20 lines
884 B
Objective-C
// RUN: rm -rf %t
|
|
// Run without global module index
|
|
// RUN: %clang_cc1 -Wauto-import -Wno-private-module -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fimplicit-module-maps -fno-modules-global-index -F %S/Inputs %s -verify
|
|
// RUN: ls %t|not grep modules.idx
|
|
// Run and create the global module index
|
|
// RUN: %clang_cc1 -Wauto-import -Wno-private-module -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify
|
|
// RUN: ls %t|grep modules.idx
|
|
// Run and use the global module index
|
|
// RUN: %clang_cc1 -Wauto-import -Wno-private-module -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify -print-stats 2>&1 | FileCheck %s
|
|
|
|
// expected-no-diagnostics
|
|
@import DependsOnModule;
|
|
@import Module;
|
|
|
|
// CHECK: *** Global Module Index Statistics:
|
|
|
|
int *get_sub() {
|
|
return Module_Sub;
|
|
}
|