[svn r377] The previous check was too strict, it completely disallowed gotos within finally blocks. This reenables them as long as they don't cross a finally boundary.

This commit is contained in:
Christian Kamm
2008-07-14 12:00:24 +02:00
parent c1fbcd9942
commit bcc4cfdea4
5 changed files with 8 additions and 7 deletions

View File

@@ -1063,12 +1063,10 @@ void GotoStatement::toIR(IRState* p)
if (global.params.symdebug)
DtoDwarfStopPoint(loc.linnum);
assert(tf == NULL);
llvm::BasicBlock* oldend = gIR->scopeend();
llvm::BasicBlock* bb = llvm::BasicBlock::Create("aftergoto", p->topfunc(), oldend);
DtoGoto(&loc, label->ident, enclosinghandler);
DtoGoto(&loc, label->ident, enclosinghandler, tf);
p->scope() = IRScope(bb,oldend);
}