diff options
author | Chris Lattner <sabre@nondot.org> | 2007-01-20 22:35:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-01-20 22:35:55 +0000 |
commit | 58092e35a3368e130438cbc793c8f9dce2e4fe0f (patch) | |
tree | c970c89150c10f0c2c19bc5670cd7df017ab0eae /lib/CodeGen/MachOWriter.cpp | |
parent | c5633c235e94f69c6a77e894bcc84d8ba71106f0 (diff) | |
download | external_llvm-58092e35a3368e130438cbc793c8f9dce2e4fe0f.zip external_llvm-58092e35a3368e130438cbc793c8f9dce2e4fe0f.tar.gz external_llvm-58092e35a3368e130438cbc793c8f9dce2e4fe0f.tar.bz2 |
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
Diffstat (limited to 'lib/CodeGen/MachOWriter.cpp')
-rw-r--r-- | lib/CodeGen/MachOWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/MachOWriter.cpp b/lib/CodeGen/MachOWriter.cpp index 64e1101..82dcf18 100644 --- a/lib/CodeGen/MachOWriter.cpp +++ b/lib/CodeGen/MachOWriter.cpp @@ -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); |