Fixed classinfo.interfaces for .. interfaces!

This commit is contained in:
Tomas Lindquist Olsen 2009-04-21 20:19:53 +02:00
parent 4567a55f7f
commit 575038bfbd
5 changed files with 54 additions and 13 deletions

View file

@ -58,18 +58,22 @@ void DtoResolveClass(ClassDeclaration* cd)
// emit the ClassZ symbol
LLGlobalVariable* ClassZ = irstruct->getClassInfoSymbol();
// emit the interfaceInfosZ symbol if necessary
if (cd->vtblInterfaces && cd->vtblInterfaces->dim > 0)
irstruct->getInterfaceArraySymbol(); // initializer is applied when it's built
// interface only emit typeinfo and classinfo
if (!cd->isInterfaceDeclaration())
if (cd->isInterfaceDeclaration())
{
irstruct->initializeInterface();
}
else
{
// emit the initZ symbol
LLGlobalVariable* initZ = irstruct->getInitSymbol();
// emit the vtblZ symbol
LLGlobalVariable* vtblZ = irstruct->getVtblSymbol();
// emit the interfaceInfosZ symbol if necessary
if (cd->vtblInterfaces && cd->vtblInterfaces->dim > 0)
irstruct->getInterfaceArraySymbol(); // initializer is applied when it's built
// perform definition
if (needs_def)
{