mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-03-15 08:31:49 +01:00
[svn r223] Fixed: assert with message could be broken.
Fixed: array length exp could fail on slice.
This commit is contained in:
@@ -2121,10 +2121,7 @@ DValue* ArrayLengthExp::toElem(IRState* p)
|
||||
}
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user