extern(C++) interfaces

This commit is contained in:
Alexey Prokhin
2013-06-22 17:33:00 +04:00
parent 324ff01fdb
commit 90bb32d2d8
4 changed files with 72 additions and 15 deletions

View File

@@ -513,8 +513,9 @@ LLValue* DtoVirtualFunctionPointer(DValue* inst, FuncDeclaration* fdecl, char* n
// sanity checks
assert(fdecl->isVirtual());
assert(!fdecl->isFinal());
assert(fdecl->vtblIndex > 0); // 0 is always ClassInfo/Interface*
assert(inst->getType()->toBasetype()->ty == Tclass);
// 0 is always ClassInfo/Interface* unless it is a CPP interface
assert(fdecl->vtblIndex > 0 || (fdecl->vtblIndex == 0 && fdecl->linkage == LINKcpp));
// get instance
LLValue* vthis = inst->getRVal();