================
@@ -1450,7 +1450,7 @@ void Preprocessor::makeModuleVisible(Module *M, 
SourceLocation Loc,
 
   // Add this module to the imports list of the currently-built submodule.
   if (!BuildingSubmoduleStack.empty() && M != BuildingSubmoduleStack.back().M)
-    BuildingSubmoduleStack.back().M->Imports.insert(M);
+    BuildingSubmoduleStack.back().M->Imports.push_back(M);
----------------
jansvoboda11 wrote:

Yes. I didn't spend much time working out how to quickly check whether one 
`ModuleRef` that only contains `Module *` corresponds to another `ModuleRef` 
that only contains the `ExternalSubmoduleSource` and `SubmoduleID`. Since all 
tests pass, I'm assuming this would be just a performance optimization rather 
than correctness fix, and the performance is much improved even without the 
deduplication here.

https://github.com/llvm/llvm-project/pull/194968
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to