diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-10-28 22:18:19 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-10-28 22:18:19 +0000 |
commit | a3feee2ad64b6604bcb35c27a35307bf470accd1 (patch) | |
tree | ddad19dc3de6eb67785751a907c8cfc504a217f7 /clang/lib/Frontend/FrontendActions.cpp | |
parent | d1cac0af6bef8496955bf2222e285c0ee46ded74 (diff) | |
download | bcm5719-llvm-a3feee2ad64b6604bcb35c27a35307bf470accd1.tar.gz bcm5719-llvm-a3feee2ad64b6604bcb35c27a35307bf470accd1.zip |
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
Diffstat (limited to 'clang/lib/Frontend/FrontendActions.cpp')
-rw-r--r-- | clang/lib/Frontend/FrontendActions.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/FrontendActions.cpp b/clang/lib/Frontend/FrontendActions.cpp index 81eb642b7e5..a3ab1be4a97 100644 --- a/clang/lib/Frontend/FrontendActions.cpp +++ b/clang/lib/Frontend/FrontendActions.cpp @@ -246,11 +246,11 @@ bool GenerateModuleAction::BeginSourceFileAction(CompilerInstance &CI, } // Check whether we can build this module at all. - StringRef Feature; - if (!Module->isAvailable(CI.getLangOpts(), CI.getTarget(), Feature)) { + clang::Module::Requirement Requirement; + if (!Module->isAvailable(CI.getLangOpts(), CI.getTarget(), Requirement)) { CI.getDiagnostics().Report(diag::err_module_unavailable) << Module->getFullModuleName() - << Feature; + << Requirement.second << Requirement.first; return false; } |