Build vtable type lazily

This commit is contained in:
Martin 2016-11-05 00:30:25 +01:00
parent 7ebcae7b6b
commit e1394fad5f
5 changed files with 23 additions and 20 deletions

View file

@ -390,6 +390,7 @@ LLValue *DtoVirtualFunctionPointer(DValue *inst, FuncDeclaration *fdecl,
LLValue *funcval = vthis;
// get the vtbl for objects
stripModifiers(inst->type->toBasetype())->ctype->isClass()->getVtblType(true);
funcval = DtoGEPi(funcval, 0, 0);
// load vtbl ptr
funcval = DtoLoad(funcval);