remove the Cleanup subclasses.

Swift SVN r4839
This commit is contained in:
Chris Lattner
2013-04-21 05:06:52 +00:00
parent ef79e16137
commit e3d6a489af
11 changed files with 10 additions and 281 deletions

View File

@@ -111,8 +111,6 @@ Cleanup &IRGenFunction::initCleanup(Cleanup &cleanup, size_t allocSize,
CleanupState state) {
cleanup.AllocatedSize = allocSize;
cleanup.State = unsigned(state);
cleanup.NormalEntryBB = nullptr;
return cleanup;
}
@@ -120,12 +118,6 @@ Cleanup &IRGenFunction::initCleanup(Cleanup &cleanup, size_t allocSize,
/// Change the state of a cleanup.
void IRGenFunction::setCleanupState(CleanupsDepth depth,
CleanupState newState) {
auto iter = Cleanups.find(depth);
assert(iter != Cleanups.end() && "changing state of end of stack");
setCleanupState(*iter, newState);
if (newState == CleanupState::Dead && iter == Cleanups.begin())
popAndEmitTopDeadCleanups(*this, Cleanups, InnermostScope);
}
void IRGenFunction::setCleanupState(Cleanup &cleanup, CleanupState newState) {