Mercurial > projects > ldc
comparison gen/llvmhelpers.cpp @ 1412:3f5ea912149d
Fix #308 by giving finally code emitted by EnclosingTryFinally a different landing pad.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 23 May 2009 00:23:39 +0200 |
parents | e57859ca8f1e |
children | 638d16625da2 |
comparison
equal
deleted
inserted
replaced
1411:e57859ca8f1e | 1412:3f5ea912149d |
---|---|
253 //////////////////////////////////////////////////////////////////////////////////////// | 253 //////////////////////////////////////////////////////////////////////////////////////// |
254 | 254 |
255 void EnclosingTryFinally::emitCode(IRState * p) | 255 void EnclosingTryFinally::emitCode(IRState * p) |
256 { | 256 { |
257 if (tf->finalbody) | 257 if (tf->finalbody) |
258 { | |
259 llvm::BasicBlock* oldpad = p->func()->landingPad; | |
260 p->func()->landingPad = landingPad; | |
258 tf->finalbody->toIR(p); | 261 tf->finalbody->toIR(p); |
262 p->func()->landingPad = oldpad; | |
263 } | |
259 } | 264 } |
260 | 265 |
261 //////////////////////////////////////////////////////////////////////////////////////// | 266 //////////////////////////////////////////////////////////////////////////////////////// |
262 | 267 |
263 void DtoEnclosingHandlers(Loc loc, Statement* target) | 268 void DtoEnclosingHandlers(Loc loc, Statement* target) |