Mercurial > projects > ldc
diff gen/toir.cpp @ 207:e0b6040585b4 trunk
[svn r223] Fixed: assert with message could be broken.
Fixed: array length exp could fail on slice.
author | lindquist |
---|---|
date | Tue, 13 May 2008 21:40:39 +0200 |
parents | 9d44ec83acd1 |
children | c4c9b4ac021b |
line wrap: on
line diff
--- a/gen/toir.cpp Tue May 13 18:07:03 2008 +0200 +++ b/gen/toir.cpp Tue May 13 21:40:39 2008 +0200 @@ -2121,10 +2121,7 @@ } else { - llvm::Value* zero = llvm::ConstantInt::get(llvm::Type::Int32Ty, 0, false); - llvm::Value* ptr = DtoGEP(u->getRVal(),zero,zero,"tmp",p->scopebb()); - ptr = new llvm::LoadInst(ptr, "tmp", p->scopebb()); - return new DImValue(type, ptr); + return new DImValue(type, DtoArrayLen(u)); } }