mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-17 12:23:14 +01:00
[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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user