comparison gen/statements.cpp @ 356:44daf304421c trunk

[svn r377] The previous check was too strict, it completely disallowed gotos within finally blocks. This reenables them as long as they don't cross a finally boundary.
author ChristianK
date Mon, 14 Jul 2008 12:00:24 +0200
parents d8357f7004ca
children 8014dbd24605
comparison
equal deleted inserted replaced
355:d8357f7004ca 356:44daf304421c
1061 LOG_SCOPE; 1061 LOG_SCOPE;
1062 1062
1063 if (global.params.symdebug) 1063 if (global.params.symdebug)
1064 DtoDwarfStopPoint(loc.linnum); 1064 DtoDwarfStopPoint(loc.linnum);
1065 1065
1066 assert(tf == NULL);
1067
1068 llvm::BasicBlock* oldend = gIR->scopeend(); 1066 llvm::BasicBlock* oldend = gIR->scopeend();
1069 llvm::BasicBlock* bb = llvm::BasicBlock::Create("aftergoto", p->topfunc(), oldend); 1067 llvm::BasicBlock* bb = llvm::BasicBlock::Create("aftergoto", p->topfunc(), oldend);
1070 1068
1071 DtoGoto(&loc, label->ident, enclosinghandler); 1069 DtoGoto(&loc, label->ident, enclosinghandler, tf);
1072 1070
1073 p->scope() = IRScope(bb,oldend); 1071 p->scope() = IRScope(bb,oldend);
1074 } 1072 }
1075 1073
1076 ////////////////////////////////////////////////////////////////////////////// 1074 //////////////////////////////////////////////////////////////////////////////