From 3eea8de2cf8e1d0fe17d569de981669ccc4d3958 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Fri, 28 Sep 2012 02:03:39 +0200 Subject: [PATCH] D1 build fix. Sorry for the breakage, I intended to push the previous change as a pull request for a CI run, not the main repository. --- ir/irstruct.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ir/irstruct.cpp b/ir/irstruct.cpp index 6178b41a..9dc1a192 100644 --- a/ir/irstruct.cpp +++ b/ir/irstruct.cpp @@ -60,12 +60,13 @@ LLGlobalVariable * IrStruct::getInitSymbol() init = new llvm::GlobalVariable( *gIR->module, init_type, true, _linkage, NULL, initname); - // set alignment (use of StructDeclaration::alignment analogous to DMD) - // FIXME: ~0 is really STRUCTALIGN_DEFAULT, change as soon as 1.075 has - // been merged. + // set alignment + init->setAlignment(type->alignsize()); +#if DMDV2 StructDeclaration *sd = aggrdecl->isStructDeclaration(); - if (sd && sd->alignment != ~0) + if (sd && sd->alignment != STRUCTALIGN_DEFAULT) init->setAlignment(sd->alignment); +#endif return init; }