Skip to content

Commit 62d1adb

Browse files
committed
SILGen: Simplify SILGenFunction::emitClosure()
1 parent 1401cba commit 62d1adb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/SILGen/SILGenFunction.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -513,10 +513,7 @@ void SILGenFunction::emitClosure(AbstractClosureExpr *ace) {
513513
emitStmt(ce->getBody());
514514
} else {
515515
auto *autoclosure = cast<AutoClosureExpr>(ace);
516-
// Closure expressions implicitly return the result of their body
517-
// expression.
518-
emitReturnExpr(ImplicitReturnLocation(ace),
519-
autoclosure->getSingleExpressionBody());
516+
emitStmt(autoclosure->getBody());
520517
}
521518
emitEpilog(ace);
522519
}

0 commit comments

Comments
 (0)