Fix #308 by giving finally code emitted by EnclosingTryFinally a different landing pad.

This commit is contained in:
Christian Kamm
2009-05-23 00:23:39 +02:00
parent adfc5b3ee9
commit 5b799deeb4
7 changed files with 29 additions and 15 deletions

View File

@@ -175,8 +175,8 @@ struct IRState
template <typename InputIterator>
llvm::CallSite IRState::CreateCallOrInvoke(LLValue* Callee, InputIterator ArgBegin, InputIterator ArgEnd, const char* Name)
{
llvm::BasicBlock* pad;
if(pad = func()->landingPad.get())
llvm::BasicBlock* pad = func()->landingPad;
if(pad)
{
// intrinsics don't support invoking and 'nounwind' functions don't need it.
LLFunction* funcval = llvm::dyn_cast<LLFunction>(Callee);