]> granicus.if.org Git - clang/commit
Modules: Make missing headers in a module.map a warning not an error.
authorDaniel Jasper <djasper@google.com>
Mon, 16 Dec 2013 14:53:57 +0000 (14:53 +0000)
committerDaniel Jasper <djasper@google.com>
Mon, 16 Dec 2013 14:53:57 +0000 (14:53 +0000)
commit013d811a7bab86d727278f31445c5eb5b2cdb407
tree04182b045a13994931a1f2ae3992eb8a2fcdc930
parent74a1c67f646da8f72d8a5c7552b19e518cc11823
Modules: Make missing headers in a module.map a warning not an error.

Instead, mark the module as unavailable so that clang errors as soon as
someone tries to build this module.

A better long-term strategy might be to not stat the header files at all
while reading the module map and instead read them only when the module
is being built (there is a corresponding FIXME in parseHeaderDecl()).
However, it seems non-trivial to get there and this would be a temporary
solution to unblock us.

Also changed the implementation to reuse the same DiagnosticsEngine as
otherwise warnings can't be enabled or disabled with command-line flags.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197388 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticGroups.td
include/clang/Basic/DiagnosticLexKinds.td
include/clang/Lex/ModuleMap.h
lib/Lex/HeaderSearch.cpp
lib/Lex/ModuleMap.cpp
test/Modules/Inputs/declare-use/custom.map [moved from test/Modules/Inputs/declare-use/module.map with 96% similarity]
test/Modules/Inputs/modular_maps/modulea.map
test/Modules/modular_maps.cpp