]> granicus.if.org Git - clang/commit
Allow a header to be part of multiple modules.
authorDaniel Jasper <djasper@google.com>
Tue, 22 Oct 2013 08:09:47 +0000 (08:09 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 22 Oct 2013 08:09:47 +0000 (08:09 +0000)
commitc641709607d45bf97772e925647db6c94866c50a
tree7fcfdd964ed228a5011bd88ef0452fe855bb3984
parent588a51a471b4cb23613e8183e05d2d193d2ab813
Allow a header to be part of multiple modules.

This patch changes two things:

a) Allow a header to be part of multiple modules. The reasoning is that
in existing codebases that have a module-like build system, the same
headers might be used in several build targets. Simple reasons might be
that they defined different classes that are declared in the same
header. Supporting a header as a part of multiple modules will make the
transistion easier for those cases. A later step in clang can then
determine whether the two modules are actually compatible and can be
merged and error out appropriately. The later check is similar to what
needs to be done for template specializations anyway.

b) Allow modules to be stored in a directory tree separate from the
headers they describe.

Review: http://llvm-reviews.chandlerc.com/D1951

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193151 91177308-0d34-0410-b5e6-96231b3b80d8
18 files changed:
include/clang/Basic/DiagnosticLexKinds.td
include/clang/Lex/ModuleMap.h
include/clang/Lex/Preprocessor.h
lib/Lex/HeaderSearch.cpp
lib/Lex/ModuleMap.cpp
lib/Lex/PPDirectives.cpp
test/Modules/Inputs/modular_maps/common.h [new file with mode: 0644]
test/Modules/Inputs/modular_maps/modulea.map
test/Modules/Inputs/modular_maps/moduleb.map
test/Modules/Inputs/separate_map_tree/maps/modulea.map [new file with mode: 0644]
test/Modules/Inputs/separate_map_tree/maps/moduleb.map [new file with mode: 0644]
test/Modules/Inputs/separate_map_tree/maps/modulec.map [new file with mode: 0644]
test/Modules/Inputs/separate_map_tree/src/common.h [new file with mode: 0644]
test/Modules/Inputs/separate_map_tree/src/private-in-c.h [new file with mode: 0644]
test/Modules/Inputs/separate_map_tree/src/public-in-b.h [new file with mode: 0644]
test/Modules/Inputs/separate_map_tree/src/public-in-c.h [new file with mode: 0644]
test/Modules/modular_maps.cpp
test/Modules/separate_map_tree.cpp [new file with mode: 0644]