summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2013-10-31 22:24:10 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2013-10-31 22:24:10 +0000
commitbc64d35c4151dc34c21d0fc971b3aee0d28d83a3 (patch)
tree90a5e9000d82dc9610214da8fe2b24688a26e1a4 /lib/CodeGen/CGExpr.cpp
parentddc2a53584f91b1fdcc466f1ea1345d97c428802 (diff)
downloadclang-bc64d35c4151dc34c21d0fc971b3aee0d28d83a3.tar.gz
clang-bc64d35c4151dc34c21d0fc971b3aee0d28d83a3.tar.bz2
clang-bc64d35c4151dc34c21d0fc971b3aee0d28d83a3.tar.xz
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). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193815 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
0 files changed, 0 insertions, 0 deletions