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

@@ -142,8 +142,13 @@ const llvm::Type* IrTypeClass::buildType()
// add vtbl
defaultTypes.push_back(llvm::PointerType::get(vtbl_pa.get(), 0));
// interface are just a vtable
if (!cd->isInterfaceDeclaration())
// interfaces are just a vtable
if (cd->isInterfaceDeclaration())
{
num_interface_vtbls = cd->vtblInterfaces ? cd->vtblInterfaces->dim : 0;
}
// classes have monitor and fields
else
{
// add monitor
defaultTypes.push_back(llvm::PointerType::get(llvm::Type::Int8Ty, 0));