diff options
Diffstat (limited to 'clang/lib/Lex/Preprocessor.cpp')
-rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index 2db109565af..1251e982533 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -763,9 +763,6 @@ void Preprocessor::LexAfterModuleImport(Token &Result) { } void Preprocessor::makeModuleVisible(Module *M, SourceLocation Loc) { - if (VisibleModules.isVisible(M)) - return; - VisibleModules.setVisible( M, Loc, [](Module *) {}, [&](ArrayRef<Module *> Path, Module *Conflict, StringRef Message) { @@ -779,7 +776,7 @@ void Preprocessor::makeModuleVisible(Module *M, SourceLocation Loc) { // Add this module to the imports list of the currently-built submodule. if (!BuildingSubmoduleStack.empty()) - BuildingSubmoduleStack.back().M->Imports.push_back(M); + BuildingSubmoduleStack.back().M->Imports.insert(M); } bool Preprocessor::FinishLexStringLiteral(Token &Result, std::string &String, |