mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-01 15:40:55 +03:00
Fixed accessing struct members via alias this
This commit is contained in:
parent
4879a8bc17
commit
a75b08bc00
1 changed files with 5 additions and 5 deletions
|
@ -705,12 +705,12 @@ void DtoDefineFunction(FuncDeclaration* fd)
|
|||
LLValue* thisvar = irfunction->thisArg;
|
||||
assert(thisvar);
|
||||
|
||||
LLValue* thismem = DtoRawAlloca(thisvar->getType(), 0, "this"); // FIXME: align?
|
||||
DtoStore(thisvar, thismem);
|
||||
if (f->fty.is_arg_this_ref)
|
||||
irfunction->thisArg = DtoLoad(thismem, "thisRef");
|
||||
else
|
||||
LLValue* thismem = thisvar;
|
||||
if (!f->fty.is_arg_this_ref) {
|
||||
thismem = DtoRawAlloca(thisvar->getType(), 0, "this"); // FIXME: align?
|
||||
DtoStore(thisvar, thismem);
|
||||
irfunction->thisArg = thismem;
|
||||
}
|
||||
|
||||
assert(!fd->vthis->ir.irLocal);
|
||||
fd->vthis->ir.irLocal = new IrLocal(fd->vthis);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue