diff options
-rw-r--r-- | clang/lib/Serialization/ModuleManager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ModuleManager.cpp b/clang/lib/Serialization/ModuleManager.cpp index f9d0fa469b2..74f75a103f7 100644 --- a/clang/lib/Serialization/ModuleManager.cpp +++ b/clang/lib/Serialization/ModuleManager.cpp @@ -194,6 +194,9 @@ void ModuleManager::removeModules( if (first == last) return; + // Explicitly clear VisitOrder since we might not notice it is stale. + VisitOrder.clear(); + // Collect the set of module file pointers that we'll be removing. llvm::SmallPtrSet<ModuleFile *, 4> victimSet(first, last); |