Mercurial > projects > ldc
comparison ir/irlandingpad.cpp @ 758:f04dde6e882c
Added initial D2 support, D2 frontend and changes to codegen to make things compile.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Tue, 11 Nov 2008 01:38:48 +0100 |
parents | 5761d7e6f628 |
children | 3d1b16dabd25 |
comparison
equal
deleted
inserted
replaced
757:2c730d530c98 | 758:f04dde6e882c |
---|---|
15 | 15 |
16 // assign storage to catch var | 16 // assign storage to catch var |
17 if(catchstmt->var) { | 17 if(catchstmt->var) { |
18 // use the same storage for all exceptions that are not accessed in | 18 // use the same storage for all exceptions that are not accessed in |
19 // nested functions | 19 // nested functions |
20 #if DMDV2 | |
21 if(!catchstmt->var->nestedrefs.dim) { | |
22 #else | |
20 if(!catchstmt->var->nestedref) { | 23 if(!catchstmt->var->nestedref) { |
24 #endif | |
21 assert(!catchstmt->var->ir.irLocal); | 25 assert(!catchstmt->var->ir.irLocal); |
22 catchstmt->var->ir.irLocal = new IrLocal(catchstmt->var); | 26 catchstmt->var->ir.irLocal = new IrLocal(catchstmt->var); |
23 LLValue* catch_var = gIR->func()->landingPad.getExceptionStorage(); | 27 LLValue* catch_var = gIR->func()->landingPad.getExceptionStorage(); |
24 catchstmt->var->ir.irLocal->value = gIR->ir->CreateBitCast(catch_var, getPtrToType(DtoType(catchstmt->var->type))); | 28 catchstmt->var->ir.irLocal->value = gIR->ir->CreateBitCast(catch_var, getPtrToType(DtoType(catchstmt->var->type))); |
25 } | 29 } |