diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2017-12-22 05:04:43 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2017-12-22 05:04:43 +0000 |
commit | e959732272f02adf100beb35f53b70d6c99130ca (patch) | |
tree | 616a7a6b9162d5154990e34a0b18365532b3ee8e /test/Modules | |
parent | bc87ce76c2159788baec3c26360073ac49aa1004 (diff) | |
download | clang-e959732272f02adf100beb35f53b70d6c99130ca.tar.gz |
[Modules] Map missing private submodules from Foo.Private to Foo_Private
In case `@import Foo.Private` fails because the submodule doesn't exist,
look for `Foo_Private` (if available) and build/load that module
instead. In that process emit a warning and tell the user about the
assumption.
The intention here is to assist all existing private modules owners
(in ObjC and Swift) to migrate to the new `Foo_Private` syntax.
rdar://problem/36023940
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@321342 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules')
-rw-r--r-- | test/Modules/implicit-map-dot-private.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Modules/implicit-map-dot-private.m b/test/Modules/implicit-map-dot-private.m new file mode 100644 index 0000000000..9fd8677f9e --- /dev/null +++ b/test/Modules/implicit-map-dot-private.m @@ -0,0 +1,12 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -verify -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -F %S/Inputs/implicit-private-canonical -emit-pch -o %t-A.pch %s -Wprivate-module + +#ifndef HEADER +#define HEADER + +@import A.Private; // expected-warning {{no submodule named 'Private' in module 'A'; using top level 'A_Private'}} +// expected-note@Inputs/implicit-private-canonical/A.framework/Modules/module.private.modulemap:1{{module defined here}} + +const int *y = &APRIVATE; + +#endif |