[svn r376] Fix bug with finally blocks and labels. The labels would get emitted multiple times and conflict.

It is now possible to add label scopes in IrFunction and all labels names will be prefixed accordingly.

Also disallow goto into finally blocks.

Fixes nocompile/finally_02 and others.
This commit is contained in:
Christian Kamm
2008-07-14 11:48:55 +02:00
parent 65be990012
commit c1fbcd9942
5 changed files with 71 additions and 4 deletions

View File

@@ -1033,7 +1033,7 @@ void LabelStatement::toIR(IRState* p)
}
else
{
std::string labelname = ident->toChars();
std::string labelname = p->func()->getScopedLabelName(ident->toChars());
llvm::BasicBlock*& labelBB = p->func()->labelToBB[labelname];
llvm::BasicBlock* oldend = gIR->scopeend();