Mercurial > projects > ldc
diff gen/asmstmt.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 | aaade6ded589 |
children | 672eb4893b55 |
line wrap: on
line diff
--- a/gen/asmstmt.cpp Mon Jul 14 11:48:55 2008 +0200 +++ b/gen/asmstmt.cpp Mon Jul 14 12:00:24 2008 +0200 @@ -388,6 +388,7 @@ : CompoundStatement(loc, s) { enclosinghandler = NULL; + tf = NULL; } // rewrite argument indices to the block scope indices @@ -648,7 +649,7 @@ sw->addCase(llvm::ConstantInt::get(llvm::IntegerType::get(32), it->second), casebb); p->scope() = IRScope(casebb,bb); - DtoGoto(&loc, it->first, enclosinghandler); + DtoGoto(&loc, it->first, enclosinghandler, tf); } p->scope() = IRScope(bb,oldend); @@ -680,6 +681,7 @@ Statement *AsmBlockStatement::semantic(Scope *sc) { enclosinghandler = sc->tfOfTry; + tf = sc->tf; return CompoundStatement::semantic(sc); }