Allow a new syntax in a module requires-declaration:
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 28 Oct 2013 22:18:19 +0000 (22:18 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 28 Oct 2013 22:18:19 +0000 (22:18 +0000)
commita3feee2ad64b6604bcb35c27a35307bf470accd1
treeddad19dc3de6eb67785751a907c8cfc504a217f7
parentd1cac0af6bef8496955bf2222e285c0ee46ded74
Allow a new syntax in a module requires-declaration:

  requires ! feature

The purpose of this is to allow (for instance) the module map for /usr/include
to exclude <tgmath.h> and <complex.h> when building in C++ (these headers are
instead provided by the C++ standard library in this case, and the glibc C
<tgmath.h> header would otherwise try to include <complex.h>, resulting in a
module cycle).

llvm-svn: 193549
15 files changed:
clang/docs/Modules.rst
clang/include/clang/Basic/DiagnosticFrontendKinds.td
clang/include/clang/Basic/Module.h
clang/lib/Basic/Module.cpp
clang/lib/Frontend/CompilerInstance.cpp
clang/lib/Frontend/FrontendActions.cpp
clang/lib/Lex/ModuleMap.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/test/Index/index-module.m
clang/test/Modules/Inputs/DependsOnModule.framework/Headers/not_cxx.h [new file with mode: 0644]
clang/test/Modules/Inputs/DependsOnModule.framework/Headers/not_objc.h [new file with mode: 0644]
clang/test/Modules/Inputs/DependsOnModule.framework/module.map
clang/test/Modules/requires.m
clang/test/Modules/requires.mm [new file with mode: 0644]