Mercurial > projects > ldc
comparison gen/statements.c @ 80:7299ff502248 trunk
[svn r84] Fixed: Returning from a void function from inside the try of a try-finally block was broken.
author | lindquist |
---|---|
date | Wed, 31 Oct 2007 22:35:39 +0100 |
parents | 875617f89c51 |
children | 3587401b6eeb |
comparison
equal
deleted
inserted
replaced
79:875617f89c51 | 80:7299ff502248 |
---|---|
126 IRFunction::FinallyVec& fin = p->func().finallys; | 126 IRFunction::FinallyVec& fin = p->func().finallys; |
127 if (fin.empty()) { | 127 if (fin.empty()) { |
128 new llvm::ReturnInst(p->scopebb()); | 128 new llvm::ReturnInst(p->scopebb()); |
129 } | 129 } |
130 else { | 130 else { |
131 new llvm::BranchInst(fin.back().bb); | 131 new llvm::BranchInst(fin.back().bb, p->scopebb()); |
132 fin.back().ret = true; | 132 fin.back().ret = true; |
133 } | 133 } |
134 } | 134 } |
135 else { | 135 else { |
136 assert(0); // why should this ever happen? | 136 assert(0); // why should this ever happen? |