summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachOWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-01-20 22:35:55 +0000
committerChris Lattner <sabre@nondot.org>2007-01-20 22:35:55 +0000
commit50ee0e40e553cbf2ce4eb920d7e2cb264f927438 (patch)
tree66423d72e856a6b3c463e21c0bb7241e7183c60e /llvm/lib/CodeGen/MachOWriter.cpp
parent7476fa445672333a766866debf2fed569dd408d9 (diff)
downloadbcm5719-llvm-50ee0e40e553cbf2ce4eb920d7e2cb264f927438.tar.gz
bcm5719-llvm-50ee0e40e553cbf2ce4eb920d7e2cb264f927438.zip
Teach TargetData to handle 'preferred' alignment for each target, and use
these alignment amounts to align scalars when we can. Patch by Scott Michel! llvm-svn: 33409
Diffstat (limited to 'llvm/lib/CodeGen/MachOWriter.cpp')
-rw-r--r--llvm/lib/CodeGen/MachOWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachOWriter.cpp b/llvm/lib/CodeGen/MachOWriter.cpp
index 64e11010b3c..82dcf1861b8 100644
--- a/llvm/lib/CodeGen/MachOWriter.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud