mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-20 23:03:14 +01:00
[svn r122] Fixed temporary delegates can now alloca their own storage.
This commit is contained in:
@@ -91,7 +91,7 @@ void DtoArrayAssign(llvm::Value* dst, llvm::Value* src)
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger::cout() << "array assignment type dont match: " << *dst->getType() << '\n' << *src->getType() << '\n';
|
||||
Logger::cout() << "array assignment type dont match: " << *dst->getType() << "\n\n" << *src->getType() << '\n';
|
||||
const llvm::ArrayType* arrty = isaArray(src->getType()->getContainedType(0));
|
||||
if (!arrty)
|
||||
{
|
||||
|
||||
10
gen/toir.cpp
10
gen/toir.cpp
@@ -2079,8 +2079,14 @@ DValue* DelegateExp::toElem(IRState* p)
|
||||
|
||||
const llvm::Type* int8ptrty = llvm::PointerType::get(llvm::Type::Int8Ty);
|
||||
|
||||
assert(p->topexp() && p->topexp()->e2 == this && p->topexp()->v);
|
||||
llvm::Value* lval = p->topexp()->v->getLVal();
|
||||
llvm::Value* lval;
|
||||
if (p->topexp() && p->topexp()->e2 == this) {
|
||||
assert(p->topexp()->v);
|
||||
lval = p->topexp()->v->getLVal();
|
||||
}
|
||||
else {
|
||||
lval = new llvm::AllocaInst(DtoType(type), "tmpdelegate", p->topallocapoint());
|
||||
}
|
||||
|
||||
llvm::Value* context = DtoGEP(lval,zero,zero,"tmp",p->scopebb());
|
||||
llvm::Value* castcontext = new llvm::BitCastInst(u->getRVal(),int8ptrty,"tmp",p->scopebb());
|
||||
|
||||
Reference in New Issue
Block a user