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();