Mercurial > projects > ldc
comparison ir/irstruct.cpp @ 307:7ade5e035beb trunk
[svn r328] Fixed an issue with interfaces where the vtable type of a interface implemented could be invalid. Fixes several tango modules like, FileStream, ServerSocket
and most tina cluster modules :)
author | lindquist |
---|---|
date | Sat, 28 Jun 2008 03:45:18 +0200 |
parents | e3355ce5444b |
children | 74101be2a553 |
comparison
equal
deleted
inserted
replaced
306:0baca2feb554 | 307:7ade5e035beb |
---|---|
2 #include "mtype.h" | 2 #include "mtype.h" |
3 #include "aggregate.h" | 3 #include "aggregate.h" |
4 #include "ir/irstruct.h" | 4 #include "ir/irstruct.h" |
5 #include "gen/irstate.h" | 5 #include "gen/irstate.h" |
6 | 6 |
7 #if OPAQUE_VTBLS | 7 IrInterface::IrInterface(BaseClass* b) |
8 IrInterface::IrInterface(BaseClass* b, const llvm::ArrayType* vt) | |
9 #else | |
10 IrInterface::IrInterface(BaseClass* b, const llvm::StructType* vt) | |
11 #endif | |
12 { | 8 { |
13 base = b; | 9 base = b; |
14 decl = b->base; | 10 decl = b->base; |
15 vtblTy = vt; | 11 vtblTy = NULL; |
16 vtblInit = NULL; | 12 vtblInit = NULL; |
17 vtbl = NULL; | 13 vtbl = NULL; |
18 infoTy = NULL; | 14 infoTy = NULL; |
19 infoInit = NULL; | 15 infoInit = NULL; |
20 info = NULL; | 16 info = NULL; |
22 index = -1; | 18 index = -1; |
23 } | 19 } |
24 | 20 |
25 IrInterface::~IrInterface() | 21 IrInterface::~IrInterface() |
26 { | 22 { |
23 delete vtblTy; | |
27 } | 24 } |
28 | 25 |
29 ////////////////////////////////////////////////////////////////////////////// | 26 ////////////////////////////////////////////////////////////////////////////// |
30 ////////////////////////////////////////////////////////////////////////////// | 27 ////////////////////////////////////////////////////////////////////////////// |
31 ////////////////////////////////////////////////////////////////////////////// | 28 ////////////////////////////////////////////////////////////////////////////// |