mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-28 10:33:14 +01:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user