Added explicit alignment for aggregate __initZ symbols, this is needed for some union types, or the default initializer symbol might be misaligned.

This commit is contained in:
Tomas Lindquist Olsen
2009-05-16 18:25:01 +02:00
parent c0f2af5afd
commit 2e33a6af9f

View File

@@ -60,6 +60,9 @@ LLGlobalVariable * IrStruct::getInitSymbol()
init = new llvm::GlobalVariable(
init_pa.get(), true, _linkage, NULL, initname, gIR->module);
// set alignment
init->setAlignment(aggrdecl->alignsize);
return init;
}