mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-26 16:43:13 +01:00
Fix #308 by giving finally code emitted by EnclosingTryFinally a different landing pad.
This commit is contained in:
@@ -255,7 +255,12 @@ void EnclosingVolatile::emitCode(IRState * p)
|
||||
void EnclosingTryFinally::emitCode(IRState * p)
|
||||
{
|
||||
if (tf->finalbody)
|
||||
{
|
||||
llvm::BasicBlock* oldpad = p->func()->landingPad;
|
||||
p->func()->landingPad = landingPad;
|
||||
tf->finalbody->toIR(p);
|
||||
p->func()->landingPad = oldpad;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user