comparison 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
comparison
equal deleted inserted replaced
206:cd2c9f4010e4 207:e0b6040585b4
2119 { 2119 {
2120 return new DArrayLenValue(e1->type, u->getLVal()); 2120 return new DArrayLenValue(e1->type, u->getLVal());
2121 } 2121 }
2122 else 2122 else
2123 { 2123 {
2124 llvm::Value* zero = llvm::ConstantInt::get(llvm::Type::Int32Ty, 0, false); 2124 return new DImValue(type, DtoArrayLen(u));
2125 llvm::Value* ptr = DtoGEP(u->getRVal(),zero,zero,"tmp",p->scopebb());
2126 ptr = new llvm::LoadInst(ptr, "tmp", p->scopebb());
2127 return new DImValue(type, ptr);
2128 } 2125 }
2129 } 2126 }
2130 2127
2131 ////////////////////////////////////////////////////////////////////////////////////////// 2128 //////////////////////////////////////////////////////////////////////////////////////////
2132 2129