Renamed IrType::get/IrType::getD, treat classes as the special case they are.

This commit is contained in:
David Nadlinger
2012-12-20 06:23:27 +01:00
parent aa4543465d
commit 464c695814
8 changed files with 35 additions and 17 deletions

View File

@@ -279,7 +279,7 @@ llvm::Type* IrTypeClass::buildType()
IF_LOG Logger::cout() << "class type: " << *type << std::endl;
return get();
return getLLType();
}
//////////////////////////////////////////////////////////////////////////////
@@ -349,13 +349,20 @@ std::vector<llvm::Type*> IrTypeClass::buildVtblType(Type* first, Array* vtbl_arr
//////////////////////////////////////////////////////////////////////////////
llvm::Type * IrTypeClass::get()
llvm::Type * IrTypeClass::getLLType()
{
return llvm::PointerType::get(type, 0);
}
//////////////////////////////////////////////////////////////////////////////
llvm::Type * IrTypeClass::getMemoryLLType()
{
return type;
}
//////////////////////////////////////////////////////////////////////////////
size_t IrTypeClass::getInterfaceIndex(ClassDeclaration * inter)
{
ClassIndexMap::iterator it = interfaceMap.find(inter);