[SILGen] Use getTypecheckedBody

Use `getTypecheckedBody` to allow lazy
type-checking when emitting function definitions.
This commit is contained in:
Hamish Knight
2020-09-04 13:24:35 -07:00
parent 8fd6d7e19a
commit 28246a7596
3 changed files with 13 additions and 13 deletions

View File

@@ -510,8 +510,8 @@ void SILGenFunction::emitFunction(FuncDecl *fd) {
fd->getResultInterfaceType(), fd->hasThrows(), fd->getThrowsLoc());
prepareEpilog(true, fd->hasThrows(), CleanupLocation(fd));
emitProfilerIncrement(fd->getBody());
emitStmt(fd->getBody());
emitProfilerIncrement(fd->getTypecheckedBody());
emitStmt(fd->getTypecheckedBody());
emitEpilog(fd);