summaryrefslogtreecommitdiffstats
path: root/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
commit7aa6af9b78bed02f36b0d5b0b9db7ffe3f689648 (patch)
tree99359a3ba012c5ac9f9fcca8e8c278d43b41cde4 /lib/Lex/Preprocessor.cpp
parent3d01a7f6ab1078f98e737b6ffd8dcdfbe78ef31a (diff)
[modules] Rearrange preprocessor module visibility handling, no observable change intended.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237331 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index 21dccd127b..87e6b5251c 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/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);
}