forked from OSchip/llvm-project
clang/Modules: Remove unused parameter from ModuleManager::removeModules
The other paremeters appear to be sufficient to determine which modules have just been loaded and need to be removed, so stop collecting and sending in that set explicitly.
This commit is contained in:
parent
7874db75ef
commit
8e9e433a2a
|
@ -255,9 +255,7 @@ public:
|
|||
std::string &ErrorStr);
|
||||
|
||||
/// Remove the modules starting from First (to the end).
|
||||
void removeModules(ModuleIterator First,
|
||||
llvm::SmallPtrSetImpl<ModuleFile *> &LoadedSuccessfully,
|
||||
ModuleMap *modMap);
|
||||
void removeModules(ModuleIterator First, ModuleMap *modMap);
|
||||
|
||||
/// Add an in-memory buffer the list of known buffers
|
||||
void addInMemoryBuffer(StringRef FileName,
|
||||
|
|
|
@ -4185,11 +4185,7 @@ ASTReader::ASTReadResult ASTReader::ReadAST(StringRef FileName,
|
|||
case VersionMismatch:
|
||||
case ConfigurationMismatch:
|
||||
case HadErrors: {
|
||||
llvm::SmallPtrSet<ModuleFile *, 4> LoadedSet;
|
||||
for (const ImportedModule &IM : Loaded)
|
||||
LoadedSet.insert(IM.Mod);
|
||||
|
||||
ModuleMgr.removeModules(ModuleMgr.begin() + NumModules, LoadedSet,
|
||||
ModuleMgr.removeModules(ModuleMgr.begin() + NumModules,
|
||||
PP.getLangOpts().Modules
|
||||
? &PP.getHeaderSearchInfo().getModuleMap()
|
||||
: nullptr);
|
||||
|
|
|
@ -219,10 +219,7 @@ ModuleManager::addModule(StringRef FileName, ModuleKind Type,
|
|||
return NewlyLoaded;
|
||||
}
|
||||
|
||||
void ModuleManager::removeModules(
|
||||
ModuleIterator First,
|
||||
llvm::SmallPtrSetImpl<ModuleFile *> &LoadedSuccessfully,
|
||||
ModuleMap *modMap) {
|
||||
void ModuleManager::removeModules(ModuleIterator First, ModuleMap *modMap) {
|
||||
auto Last = end();
|
||||
if (First == Last)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue