mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-05 22:43:13 +01:00
Fix passing of a padded struct to a function
This commit is contained in:
@@ -258,9 +258,11 @@ LLValue* DtoResolveNestedContext(Loc loc, ClassDeclaration *decl, LLValue *value
|
||||
LLValue* nest = DtoNestedContext(loc, decl);
|
||||
|
||||
// store into right location
|
||||
size_t idx = decl->vthis->ir.irField->index;
|
||||
LLValue* gep = DtoGEPi(value,0,idx,"tmp");
|
||||
DtoStore(DtoBitCast(nest, gep->getType()->getContainedType(0)), gep);
|
||||
if (!llvm::dyn_cast<llvm::UndefValue>(nest)) {
|
||||
size_t idx = decl->vthis->ir.irField->index;
|
||||
LLValue* gep = DtoGEPi(value,0,idx,".vthis");
|
||||
DtoStore(DtoBitCast(nest, gep->getType()->getContainedType(0)), gep);
|
||||
}
|
||||
}
|
||||
|
||||
LLValue* DtoNestedContext(Loc loc, Dsymbol* sym)
|
||||
|
||||
Reference in New Issue
Block a user