mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-04-18 06:10:37 +00:00

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
14 lines
850 B
Plaintext
14 lines
850 B
Plaintext
// RUN: rm -rf %t
|
|
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -Wno-private-module -F %S/Inputs -I %S/Inputs/DependsOnModule.framework %s -verify
|
|
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -Wno-private-module -F %S/Inputs -I %S/Inputs/DependsOnModule.framework %s -verify -fcoroutines-ts -DCOROUTINES
|
|
|
|
#ifdef COROUTINES
|
|
@import DependsOnModule.Coroutines;
|
|
// expected-error@module.map:29 {{module 'DependsOnModule.NotCoroutines' is incompatible with feature 'coroutines'}}
|
|
@import DependsOnModule.NotCoroutines; // expected-note {{module imported here}}
|
|
#else
|
|
@import DependsOnModule.NotCoroutines;
|
|
// expected-error@module.map:25 {{module 'DependsOnModule.Coroutines' requires feature 'coroutines'}}
|
|
@import DependsOnModule.Coroutines; // expected-note {{module imported here}}
|
|
#endif
|