mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-12 22:14:54 +03:00
Cleanup.
If ad would be null, the code above would have already crashed.
This commit is contained in:
parent
bb24f9bafe
commit
c9e2fc34d1
1 changed files with 2 additions and 2 deletions
|
@ -223,7 +223,7 @@ LLValue* DtoNestedContext(Loc loc, Dsymbol* sym)
|
||||||
#if DMDV2
|
#if DMDV2
|
||||||
AggregateDeclaration* ad = irfunc->decl->isMember2();
|
AggregateDeclaration* ad = irfunc->decl->isMember2();
|
||||||
val = ad->isClassDeclaration() ? DtoLoad(irfunc->thisArg) : irfunc->thisArg;
|
val = ad->isClassDeclaration() ? DtoLoad(irfunc->thisArg) : irfunc->thisArg;
|
||||||
if (!ad || !ad->vthis)
|
if (!ad->vthis)
|
||||||
return llvm::UndefValue::get(getVoidPtrType());
|
return llvm::UndefValue::get(getVoidPtrType());
|
||||||
#else
|
#else
|
||||||
ClassDeclaration* ad = irfunc->decl->isMember2()->isClassDeclaration();
|
ClassDeclaration* ad = irfunc->decl->isMember2()->isClassDeclaration();
|
||||||
|
@ -231,7 +231,7 @@ LLValue* DtoNestedContext(Loc loc, Dsymbol* sym)
|
||||||
if (!ad || !ad->vthis)
|
if (!ad || !ad->vthis)
|
||||||
return val;
|
return val;
|
||||||
#endif
|
#endif
|
||||||
val = DtoLoad(DtoGEPi(val, 0,ad->vthis->ir.irField->index, ".vthis"));
|
val = DtoLoad(DtoGEPi(val, 0, ad->vthis->ir.irField->index, ".vthis"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue