CallExp::cacheLvalue is back

This commit is contained in:
Alexey Prokhin
2010-10-30 20:51:31 +04:00
parent 6215324b8f
commit 24c92d3a7c
2 changed files with 17 additions and 0 deletions

View File

@@ -1124,6 +1124,9 @@ struct CallExp : UnaExp
#if IN_LLVM
DValue* toElem(IRState* irs);
#if DMDV2
void cacheLvalue(IRState* p);
#endif
#endif
};

View File

@@ -771,6 +771,20 @@ DValue* ModExp::toElem(IRState* p)
//////////////////////////////////////////////////////////////////////////////////////////
#if DMDV2
void CallExp::cacheLvalue(IRState* p)
{
Logger::println("Caching l-value of %s", toChars());
LOG_SCOPE;
cachedLvalue = toElem(p)->getLVal();
}
#endif
//////////////////////////////////////////////////////////////////////////////////////////
DValue* CallExp::toElem(IRState* p)
{
Logger::print("CallExp::toElem: %s @ %s\n", toChars(), type->toChars());