mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
Teach TargetData to handle 'preferred' alignment for each target, and use
these alignment amounts to align scalars when we can. Patch by Scott Michel! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33409 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -309,7 +309,7 @@ void MachOWriter::AddSymbolToSection(MachOSection *Sec, GlobalVariable *GV) {
|
||||
unsigned Size = TM.getTargetData()->getTypeSize(Ty);
|
||||
unsigned Align = GV->getAlignment();
|
||||
if (Align == 0)
|
||||
Align = TM.getTargetData()->getTypeAlignment(Ty);
|
||||
Align = TM.getTargetData()->getTypeAlignmentPref(Ty);
|
||||
|
||||
MachOSym Sym(GV, Mang->getValueName(GV), Sec->Index, TM);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user