[PATCH] Modules: Make missing headers in a module.map a warning not an error.

Daniel Jasper djasper at google.com
Fri Dec 6 05:24:36 PST 2013


Hi klimek, rsmith, doug.gregor,

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.

http://llvm-reviews.chandlerc.com/D2352

Files:
  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
  test/Modules/Inputs/declare-use/module.map
  test/Modules/Inputs/modular_maps/modulea.map
  test/Modules/declare-use1.cpp
  test/Modules/declare-use2.cpp
  test/Modules/modular_maps.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2352.1.patch
Type: text/x-patch
Size: 9605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131206/9caa8182/attachment.bin>


More information about the cfe-commits mailing list