changeset 1549:327eef051d50

Always emit a stop point for return statements - even for void returns.
author Christian Kamm <kamm incasoftware de>
date Sun, 26 Jul 2009 18:32:25 +0200
parents a326f145a57b
children c704fea92f80
files gen/statements.cpp
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gen/statements.cpp	Tue Jul 21 13:11:39 2009 +0200
+++ b/gen/statements.cpp	Sun Jul 26 18:32:25 2009 +0200
@@ -53,6 +53,9 @@
     Logger::println("ReturnStatement::toIR(): %s", loc.toChars());
     LOG_SCOPE;
 
+    if (global.params.symdebug)
+        DtoDwarfStopPoint(loc.linnum);
+    
     // is there a return value expression?
     if (exp)
     {
@@ -64,9 +67,6 @@
             IrFunction* f = p->func();
             assert(f->decl->ir.irFunc->retArg);
 
-            // emit dbg line
-            if (global.params.symdebug) DtoDwarfStopPoint(loc.linnum);
-
             // FIXME: is there ever a case where a sret return needs to be rewritten for the ABI?
 
             // get return pointer
@@ -88,8 +88,6 @@
         // the return type is not void, so this is a normal "register" return
         else
         {
-            if (global.params.symdebug) DtoDwarfStopPoint(loc.linnum);
-
             // do abi specific transformations on the return value
             LLValue* v = p->func()->type->fty.putRet(exp->type, exp->toElem(p));