summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPDirectives.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-05-19 19:58:11 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-05-19 19:58:11 +0000
commit54ef4c3bb36fdc1dbe2e0348c2890b5c8216e4d7 (patch)
treed146f0db7778269243b51a9a89c1de1fb7ff2b72 /clang/lib/Lex/PPDirectives.cpp
parent35c63ef76c80bff41855f92a91603ae7085259d6 (diff)
downloadbcm5719-llvm-54ef4c3bb36fdc1dbe2e0348c2890b5c8216e4d7.tar.gz
bcm5719-llvm-54ef4c3bb36fdc1dbe2e0348c2890b5c8216e4d7.zip
Revert r237609 for now.
glibc's headers use __need_* macros to selectively export parts of themselves to each other. This requires us to enter those files repeatedly when building a glibc module. This can be unreverted once we have a better mechanism to deal with that non-modular aspect of glibc (possibly some way to mark a header as "textual if this macro is defined"). llvm-svn: 237718
Diffstat (limited to 'clang/lib/Lex/PPDirectives.cpp')
-rw-r--r--clang/lib/Lex/PPDirectives.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index aaed6b92d48..ec06e790f01 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/lib/Lex/PPDirectives.cpp
@@ -1737,12 +1737,13 @@ void Preprocessor::HandleIncludeDirective(SourceLocation HashLoc,
std::max(HeaderInfo.getFileDirFlavor(File),
SourceMgr.getFileCharacteristic(FilenameTok.getLocation()));
+ // FIXME: If we have a suggested module, and we've already visited this file,
+ // don't bother entering it again. We know it has no further effect.
+
// Ask HeaderInfo if we should enter this #include file. If not, #including
- // this file will have no effect. We treat any textual inclusion of a modular
- // header as a #import here.
+ // this file will have no effect.
if (ShouldEnter &&
- !HeaderInfo.ShouldEnterIncludeFile(
- *this, File, isImport || SuggestedModule.getModule())) {
+ !HeaderInfo.ShouldEnterIncludeFile(*this, File, isImport)) {
ShouldEnter = false;
if (Callbacks)
Callbacks->FileSkipped(*File, FilenameTok, FileCharacter);
OpenPOWER on IntegriCloud