From 1e825d057a6feb37e6ecfefb511f16585c67d2a2 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Sun, 12 Oct 2008 15:30:58 +0200 Subject: [PATCH] Emit region.end debug calls before a throw. --- gen/statements.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gen/statements.cpp b/gen/statements.cpp index a790f0b0..23c1e4a7 100644 --- a/gen/statements.cpp +++ b/gen/statements.cpp @@ -641,6 +641,9 @@ void ThrowStatement::toIR(IRState* p) assert(exp); DValue* e = exp->toElem(p); + + if (global.params.symdebug) DtoDwarfFuncEnd(gIR->func()->decl); + llvm::Function* fn = LLVM_D_GetRuntimeFunction(gIR->module, "_d_throw_exception"); //Logger::cout() << "calling: " << *fn << '\n'; LLValue* arg = DtoBitCast(e->getRVal(), fn->getFunctionType()->getParamType(0));