mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SILGen: Simplify SILGenFunction::emitClosure()
This commit is contained in:
@@ -513,10 +513,7 @@ void SILGenFunction::emitClosure(AbstractClosureExpr *ace) {
|
||||
emitStmt(ce->getBody());
|
||||
} else {
|
||||
auto *autoclosure = cast<AutoClosureExpr>(ace);
|
||||
// Closure expressions implicitly return the result of their body
|
||||
// expression.
|
||||
emitReturnExpr(ImplicitReturnLocation(ace),
|
||||
autoclosure->getSingleExpressionBody());
|
||||
emitStmt(autoclosure->getBody());
|
||||
}
|
||||
emitEpilog(ace);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user