Mercurial > projects > ldc
changeset 600:311f16f26297
Fixed AddrExp might silently change the type of its value, but we weren't casting to compensate ... why doesn't DMD insert a cast?
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Mon, 15 Sep 2008 02:39:55 +0200 |
parents | 4435f57956e7 |
children | 03a5e609eef3 |
files | gen/toir.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/toir.cpp Mon Sep 15 02:04:26 2008 +0200 +++ b/gen/toir.cpp Mon Sep 15 02:39:55 2008 +0200 @@ -854,7 +854,7 @@ Logger::println("is nothing special"); LLValue* lval = v->getLVal(); Logger::cout() << "lval: " << *lval << '\n'; - return new DImValue(type, v->getLVal()); + return new DImValue(type, DtoBitCast(v->getLVal(), DtoType(type))); } LLConstant* AddrExp::toConstElem(IRState* p)