Mercurial > projects > ldc
comparison gen/irstate.h @ 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 | 329e45865d84 |
children | 4dca8ed9d8b7 |
comparison
equal
deleted
inserted
replaced
1411:e57859ca8f1e | 1412:3f5ea912149d |
---|---|
173 }; | 173 }; |
174 | 174 |
175 template <typename InputIterator> | 175 template <typename InputIterator> |
176 llvm::CallSite IRState::CreateCallOrInvoke(LLValue* Callee, InputIterator ArgBegin, InputIterator ArgEnd, const char* Name) | 176 llvm::CallSite IRState::CreateCallOrInvoke(LLValue* Callee, InputIterator ArgBegin, InputIterator ArgEnd, const char* Name) |
177 { | 177 { |
178 llvm::BasicBlock* pad; | 178 llvm::BasicBlock* pad = func()->landingPad; |
179 if(pad = func()->landingPad.get()) | 179 if(pad) |
180 { | 180 { |
181 // intrinsics don't support invoking and 'nounwind' functions don't need it. | 181 // intrinsics don't support invoking and 'nounwind' functions don't need it. |
182 LLFunction* funcval = llvm::dyn_cast<LLFunction>(Callee); | 182 LLFunction* funcval = llvm::dyn_cast<LLFunction>(Callee); |
183 if (funcval && (funcval->isIntrinsic() || funcval->doesNotThrow())) | 183 if (funcval && (funcval->isIntrinsic() || funcval->doesNotThrow())) |
184 { | 184 { |