Mercurial > projects > ldc
diff gen/llvmhelpers.cpp @ 505:841589c97f20
Do not assert if there's a struct-this nested context.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Wed, 13 Aug 2008 20:50:54 +0200 |
parents | 7148a3f2b44b |
children | cecfee2d01a8 |
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp Wed Aug 13 17:11:03 2008 +0200 +++ b/gen/llvmhelpers.cpp Wed Aug 13 20:50:54 2008 +0200 @@ -398,8 +398,7 @@ else if (irfunc->thisArg) { ClassDeclaration* cd = irfunc->decl->isMember2()->isClassDeclaration(); - assert(cd); - if (!cd->vthis) + if (!cd || !cd->vthis) return getNullPtr(getVoidPtrType()); LLValue* val = DtoLoad(irfunc->thisArg); return DtoLoad(DtoGEPi(val, 0,2+cd->vthis->ir.irField->index, ".vthis"));