Go to file
Dmitri Gribenko dc360d5739 Clang modules: collect exports recursively
This change makes Module::buildVisibleModulesCache() collect exported modules
recursively.

While computing a set of exports, getExportedModules() iterates over the set of
imported modules and filters it.  But it does not consider the set of exports
of those modules -- it is the responsibility of the caller to do this.

Here is a certain instance of this issue.  Module::isModuleVisible says that
CoreFoundation.CFArray submodule is not visible from Cocoa.  Why?

- Cocoa imports Foundation.
- Foundation has an export restriction: "export *".
- Foundation imports CoreFoundation.  (Just the top-level module.)
- CoreFoundation exports CoreFoundation.CFArray.

To decide which modules are visible from Cocoa, we collect all exported modules
from immediate imports in Cocoa:

> visibleModulesFro(Cocoa) = exported(Foundation) + exported(CoreData) + exported(AppKit)

To find out which modules are exported, we filter imports according to
restrictions:

> exported(Foundation) = filterByModuleMapRestrictions(imports(Foundation))

Because Foundation imports CoreFoundation (not CoreFoundation.CFArray), the
CFArray submodule is considered not exported from Foundation, and is not
visible from Cocoa (according to Module::isModuleVisible).

llvm-svn: 193815
2013-10-31 22:24:10 +00:00
clang Clang modules: collect exports recursively 2013-10-31 22:24:10 +00:00
clang-tools-extra Rename Input to Inputs, for consistency with other tests. 2013-10-31 21:29:44 +00:00
compiler-rt [Sanitizer] Add Symbolizer::AddHooks() and use it in TSan and MSan. 2013-10-31 21:44:07 +00:00
debuginfo-tests don't use CHECK-NEXT because it may be on the same line. 2013-09-18 23:01:54 +00:00
libclc s/_CLC_DECL/_CLC_DEF/ 2013-10-31 15:50:53 +00:00
libcxx LWG issue 2341; Make the two variants of basic_ostream::seekp and basic_istream::seekg behave consistently; update tests to make sure 2013-10-31 22:20:45 +00:00
libcxxabi Move local Db type out to namespace scope. 2013-10-22 16:45:48 +00:00
lld [PECOFF] File extension is case-insensitive on Windows. 2013-10-31 20:06:48 +00:00
lldb Marking dynamic value test as expected failure on Linux. 2013-10-31 22:07:11 +00:00
llvm Modify CMakeLists.txt to work around pr17763 and bring some bots back. 2013-10-31 22:13:41 +00:00
openmp Update web pages to include style sheets and referenced documents missed before. 2013-10-03 11:55:28 +00:00
polly Update comments to address Sebastian's review 2013-10-31 11:50:52 +00:00