Mercurial > projects > ldc
diff gen/irstate.c @ 81:3587401b6eeb trunk
[svn r85] Fixed: if a return statement appeared in the try block of a nested try-finally, only the inner-most finally block would be executed.
Changed: Renamed all the LLVM_Dto... helper function to just Dto...
author | lindquist |
---|---|
date | Thu, 01 Nov 2007 17:27:18 +0100 |
parents | b706170e24a9 |
children | d8dd47ef3973 |
line wrap: on
line diff
--- a/gen/irstate.c Wed Oct 31 22:35:39 2007 +0100 +++ b/gen/irstate.c Thu Nov 01 17:27:18 2007 +0100 @@ -122,13 +122,15 @@ ////////////////////////////////////////////////////////////////////////////////////////// IRFinally::IRFinally() - : bb(NULL), ret(false), retval(NULL) { + bb = 0; + retbb = 0; } -IRFinally::IRFinally(llvm::BasicBlock* b) - : bb(b), ret(false), retval(NULL) +IRFinally::IRFinally(llvm::BasicBlock* b, llvm::BasicBlock* rb) { + bb = b; + retbb = rb; } ////////////////////////////////////////////////////////////////////////////////////////// @@ -145,11 +147,12 @@ IRFunction::IRFunction(FuncDeclaration* fd) { decl = fd; - Type* t = LLVM_DtoDType(fd->type); + Type* t = DtoDType(fd->type); assert(t->ty == Tfunction); type = (TypeFunction*)t; func = NULL; allocapoint = NULL; + finallyretval = NULL; } //////////////////////////////////////////////////////////////////////////////////////////