From b218bfc8283ea9696c08d86509abc881982fb3e0 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Wed, 3 Jun 2009 03:49:24 +0200 Subject: [PATCH] Added missing initializer of (LDC introduced) Expression::cachedLvalue in D2 frontend. --- dmd2/expression.c | 4 ++++ gen/toir.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/dmd2/expression.c b/dmd2/expression.c index ef2d29a6..cf770f85 100644 --- a/dmd2/expression.c +++ b/dmd2/expression.c @@ -889,6 +889,10 @@ Expression::Expression(Loc loc, enum TOK op, int size) this->op = op; this->size = size; type = NULL; + +#if IN_LLVM + cachedLvalue = NULL; +#endif } Expression *Expression::syntaxCopy() diff --git a/gen/toir.cpp b/gen/toir.cpp index be72c50b..1aac027a 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -1054,6 +1054,7 @@ DValue* DotVarExp::toElem(IRState* p) if (cachedLvalue) { + Logger::println("using cached lvalue"); LLValue *V = cachedLvalue; cachedLvalue = NULL; VarDeclaration* vd = var->isVarDeclaration();