]> granicus.if.org Git - clang/commit
Modules: Enforce that ModuleManager::removeModules deletes the tail
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 28 Jan 2017 23:02:12 +0000 (23:02 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 28 Jan 2017 23:02:12 +0000 (23:02 +0000)
commit98d193728f18afdb0f941d0d5ba8086518435aeb
treee2cc5c01d09883d154ed6032afd263bf2eee4ed3
parente83e9fc0d7c4e16835d717396f664752e058c1cb
Modules: Enforce that ModuleManager::removeModules deletes the tail

ModuleManager::removeModules always deletes a tail of the
ModuleManager::Chain.  Change the API to enforce that so that we can
simplify the code inside.

There's no real functionality change, although there's a slight
performance hack to loop to the First deleted module instead of the
final module in the chain (skipping the about-to-be-deleted tail).

Also document something suspicious: we fail to clean deleted modules out
of ModuleFile::Imports.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293398 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Serialization/ModuleManager.h
lib/Serialization/ASTReader.cpp
lib/Serialization/ModuleManager.cpp