Assorted minor improvements to the cleanup system.

This commit is contained in:
John McCall
2018-08-22 01:26:37 -04:00
parent 1155adeef1
commit fae2ec3b38
5 changed files with 43 additions and 33 deletions

View File

@@ -47,6 +47,8 @@ struct LValueWritebackCleanup : Cleanup {
void emit(SILGenFunction &SGF, CleanupLocation loc,
ForUnwind_t forUnwind) override {
FullExpr scope(SGF.Cleanups, loc);
// TODO: honor forUnwind!
auto &evaluation = *SGF.FormalEvalContext.find(Depth);
assert(evaluation.getKind() == FormalAccess::Exclusive);