From c9e2fc34d197e0a51292c35f1a416d1678a13ec5 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sat, 6 Oct 2012 20:39:24 +0200 Subject: [PATCH] Cleanup. If ad would be null, the code above would have already crashed. --- gen/nested.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gen/nested.cpp b/gen/nested.cpp index 7efa4038..6ce7ee5d 100644 --- a/gen/nested.cpp +++ b/gen/nested.cpp @@ -223,7 +223,7 @@ LLValue* DtoNestedContext(Loc loc, Dsymbol* sym) #if DMDV2 AggregateDeclaration* ad = irfunc->decl->isMember2(); val = ad->isClassDeclaration() ? DtoLoad(irfunc->thisArg) : irfunc->thisArg; - if (!ad || !ad->vthis) + if (!ad->vthis) return llvm::UndefValue::get(getVoidPtrType()); #else ClassDeclaration* ad = irfunc->decl->isMember2()->isClassDeclaration(); @@ -231,7 +231,7 @@ LLValue* DtoNestedContext(Loc loc, Dsymbol* sym) if (!ad || !ad->vthis) return val; #endif - val = DtoLoad(DtoGEPi(val, 0,ad->vthis->ir.irField->index, ".vthis")); + val = DtoLoad(DtoGEPi(val, 0, ad->vthis->ir.irField->index, ".vthis")); } else {