diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:00:23 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-24 01:00:23 +0000 |
| commit | 6252156da5066bd47f63f8bd40404d1f89909d32 (patch) | |
| tree | 743d1b59945b071890dc19b6bf5e9d3ff0d1399b /lib/Lex/HeaderSearch.cpp | |
| parent | 461a67fa15370a9ec88f8f8a240bf7c123bb2029 (diff) | |
Notes
Diffstat (limited to 'lib/Lex/HeaderSearch.cpp')
| -rw-r--r-- | lib/Lex/HeaderSearch.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/Lex/HeaderSearch.cpp b/lib/Lex/HeaderSearch.cpp index aa2588659ddf..6976294a2eaf 100644 --- a/lib/Lex/HeaderSearch.cpp +++ b/lib/Lex/HeaderSearch.cpp @@ -209,11 +209,14 @@ Module *HeaderSearch::lookupModule(StringRef ModuleName, bool AllowSearch) { // The facility for "private modules" -- adjacent, optional module maps named // module.private.modulemap that are supposed to define private submodules -- - // is sometimes misused by frameworks that name their associated private - // module FooPrivate, rather than as a submodule named Foo.Private as - // intended. Here we compensate for such cases by looking in directories named - // Foo.framework, when we previously looked and failed to find a - // FooPrivate.framework. + // may have different flavors of names: FooPrivate, Foo_Private and Foo.Private. + // + // Foo.Private is now depracated in favor of Foo_Private. Users of FooPrivate + // should also rename to Foo_Private. Representing private as submodules + // could force building unwanted dependencies into the parent module and cause + // dependency cycles. + if (!Module && SearchName.consume_back("_Private")) + Module = lookupModule(ModuleName, SearchName); if (!Module && SearchName.consume_back("Private")) Module = lookupModule(ModuleName, SearchName); return Module; |
