summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPLexerChange.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-10-22 23:50:56 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-10-22 23:50:56 +0000
commit306d892076c831131ebe47125b1dfe41f736e1b0 (patch)
treef6cbaae79943965a27b80f55cecf03b3a6d81ec9 /clang/lib/Lex/PPLexerChange.cpp
parent1fd051bfe8f4013f1bd973b28fd2b3f23ad7b7a5 (diff)
downloadbcm5719-llvm-306d892076c831131ebe47125b1dfe41f736e1b0.tar.gz
bcm5719-llvm-306d892076c831131ebe47125b1dfe41f736e1b0.zip
[modules] Add support for 'textual header' directives.
This allows a module to specify that it logically contains a file, but that said file is non-modular and intended for textual inclusion. This allows layering checks to work properly in the presence of such files. llvm-svn: 220448
Diffstat (limited to 'clang/lib/Lex/PPLexerChange.cpp')
-rw-r--r--clang/lib/Lex/PPLexerChange.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Lex/PPLexerChange.cpp b/clang/lib/Lex/PPLexerChange.cpp
index f0d3d67acae..33256ec5b68 100644
--- a/clang/lib/Lex/PPLexerChange.cpp
+++ b/clang/lib/Lex/PPLexerChange.cpp
@@ -519,7 +519,8 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) {
continue;
// If it's not part of a module and not unknown, complain.
- if (!ModMap.findModuleForHeader(File) &&
+ if (!ModMap.findModuleForHeader(File, nullptr,
+ /*IncludeTextualHeaders*/true) &&
!ModMap.isHeaderInUnavailableModule(File)) {
Diag(StartLoc, diag::warn_forgotten_module_header)
<< File->getName() << Mod->getFullModuleName();
OpenPOWER on IntegriCloud