aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2015-05-14 02:25:44 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2015-05-14 02:25:44 +0000
commitdbbc5236395171104128620dd4aed4084ba92c68 (patch)
tree984f066593ef31b4c2107a2d78da33931b8cb3d3 /clang/lib/Lex/Preprocessor.cpp
parentc9fa0b8e2178f2c23a75157b9e861c2e0f121dc7 (diff)
downloadllvm-dbbc5236395171104128620dd4aed4084ba92c68.zip
llvm-dbbc5236395171104128620dd4aed4084ba92c68.tar.gz
llvm-dbbc5236395171104128620dd4aed4084ba92c68.tar.bz2
[modules] Rearrange preprocessor module visibility handling, no observable change intended.
llvm-svn: 237331
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r--clang/lib/Lex/Preprocessor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp
index 21dccd1..87e6b52 100644
--- a/clang/lib/Lex/Preprocessor.cpp
+++ b/clang/lib/Lex/Preprocessor.cpp
@@ -775,7 +775,7 @@ void Preprocessor::makeModuleVisible(Module *M, SourceLocation Loc) {
});
// Add this module to the imports list of the currently-built submodule.
- if (!BuildingSubmoduleStack.empty())
+ if (!BuildingSubmoduleStack.empty() && M != BuildingSubmoduleStack.back().M)
BuildingSubmoduleStack.back().M->Imports.insert(M);
}