Mercurial > projects > ldc
comparison gen/classes.cpp @ 1253:752bed475b75
Fixed classinfo.interfaces for .. interfaces!
author | Tomas Lindquist Olsen <tomas.l.olsen gmail com> |
---|---|
date | Tue, 21 Apr 2009 20:19:53 +0200 |
parents | 7c1b55db4ff3 |
children | ec1d9dc1d32a |
comparison
equal
deleted
inserted
replaced
1252:7c1b55db4ff3 | 1253:752bed475b75 |
---|---|
56 bool needs_def = mustDefineSymbol(cd); | 56 bool needs_def = mustDefineSymbol(cd); |
57 | 57 |
58 // emit the ClassZ symbol | 58 // emit the ClassZ symbol |
59 LLGlobalVariable* ClassZ = irstruct->getClassInfoSymbol(); | 59 LLGlobalVariable* ClassZ = irstruct->getClassInfoSymbol(); |
60 | 60 |
61 // emit the interfaceInfosZ symbol if necessary | |
62 if (cd->vtblInterfaces && cd->vtblInterfaces->dim > 0) | |
63 irstruct->getInterfaceArraySymbol(); // initializer is applied when it's built | |
64 | |
61 // interface only emit typeinfo and classinfo | 65 // interface only emit typeinfo and classinfo |
62 if (!cd->isInterfaceDeclaration()) | 66 if (cd->isInterfaceDeclaration()) |
67 { | |
68 irstruct->initializeInterface(); | |
69 } | |
70 else | |
63 { | 71 { |
64 // emit the initZ symbol | 72 // emit the initZ symbol |
65 LLGlobalVariable* initZ = irstruct->getInitSymbol(); | 73 LLGlobalVariable* initZ = irstruct->getInitSymbol(); |
66 // emit the vtblZ symbol | 74 // emit the vtblZ symbol |
67 LLGlobalVariable* vtblZ = irstruct->getVtblSymbol(); | 75 LLGlobalVariable* vtblZ = irstruct->getVtblSymbol(); |
68 | |
69 // emit the interfaceInfosZ symbol if necessary | |
70 if (cd->vtblInterfaces && cd->vtblInterfaces->dim > 0) | |
71 irstruct->getInterfaceArraySymbol(); // initializer is applied when it's built | |
72 | 76 |
73 // perform definition | 77 // perform definition |
74 if (needs_def) | 78 if (needs_def) |
75 { | 79 { |
76 // set symbol initializers | 80 // set symbol initializers |