mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-21 14:13:20 +01:00
Fixed all issues preventing Tango 0.99.8 to compile with `sh build-tango.sh --verbose ldc'.
This commit is contained in:
@@ -109,9 +109,7 @@ void IrTypeClass::addBaseClassData(
|
||||
offset += PTRSIZE;
|
||||
|
||||
// add to the interface map
|
||||
// FIXME: and all it's baseinterfaces
|
||||
if (interfaceMap.find(b->base) == interfaceMap.end())
|
||||
interfaceMap.insert(std::make_pair(b->base, field_index));
|
||||
addInterfaceToMap(b->base, field_index);
|
||||
field_index++;
|
||||
|
||||
// inc count
|
||||
@@ -252,3 +250,22 @@ size_t IrTypeClass::getInterfaceIndex(ClassDeclaration * inter)
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
void IrTypeClass::addInterfaceToMap(ClassDeclaration * inter, size_t index)
|
||||
{
|
||||
// don't duplicate work or overwrite indices
|
||||
if (interfaceMap.find(inter) != interfaceMap.end())
|
||||
return;
|
||||
|
||||
// add this interface
|
||||
interfaceMap.insert(std::make_pair(inter, index));
|
||||
|
||||
// add all its base interfaces recursively
|
||||
for (size_t i = 0; i < inter->interfaces_dim; i++)
|
||||
{
|
||||
BaseClass* b = inter->interfaces[i];
|
||||
addInterfaceToMap(b->base, index);
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user