mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 07:00:46 +03:00
parent
a5075f10b7
commit
2b77da4e2e
2 changed files with 7 additions and 3 deletions
|
@ -138,7 +138,7 @@ void ScopeStack::runCleanups(
|
|||
}
|
||||
|
||||
// Insert the unconditional branch to the first cleanup block.
|
||||
irs->ir->CreateBr(cleanupScopes.back().beginBlock);
|
||||
irs->ir->CreateBr(cleanupScopes[sourceScope - 1].beginBlock);
|
||||
|
||||
// Update all the control flow in the cleanups to make sure we end up where
|
||||
// we want.
|
||||
|
@ -353,6 +353,7 @@ llvm::BasicBlock* ScopeStack::emitLandingPad() {
|
|||
it != end; ++it
|
||||
) {
|
||||
// Insert any cleanups in between the last catch we ran and this one.
|
||||
assert(lastCleanup >= it->cleanupScope);
|
||||
if (lastCleanup > it->cleanupScope) {
|
||||
landingPad->setCleanup(true);
|
||||
llvm::BasicBlock* afterCleanupBB = llvm::BasicBlock::Create(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue