Permalink
Browse files

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.
  • Loading branch information...
1 parent 5f6447e commit 3eea8de2cf8e1d0fe17d569de981669ccc4d3958 @klickverbot klickverbot committed Sep 28, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 ir/irstruct.cpp
View
@@ -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;
}

0 comments on commit 3eea8de

Please sign in to comment.