mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-07 03:16:05 +03:00
Introduce DtoAlignment() and overload DtoAlloca() for VarDeclarations
Trying to get the alignment right by using the first non-default one in the following order of descending priority: VarDeclaration::alignment [variables only of course] Type::alignment() Type::alignsize() This fixes `align(x) struct S { ... }`.
This commit is contained in:
parent
8211be11de
commit
05c10d9107
11 changed files with 48 additions and 23 deletions
|
@ -876,7 +876,7 @@ void DtoDefineFunction(FuncDeclaration* fd)
|
|||
// Create the param here and set it to a "dummy" alloca that
|
||||
// we do not store to here.
|
||||
irparam = getIrParameter(vd, true);
|
||||
irparam->value = DtoAlloca(vd->type, vd->ident->toChars());
|
||||
irparam->value = DtoAlloca(vd, vd->ident->toChars());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue