summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ELFWriter.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/ELFWriter.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/ELFWriter.cpp')
-rw-r--r--llvm/lib/CodeGen/ELFWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ELFWriter.cpp b/llvm/lib/CodeGen/ELFWriter.cpp
index 4f988070fdd..3b9653740cc 100644
--- a/llvm/lib/CodeGen/ELFWriter.cpp
+++ b/llvm/lib/CodeGen/ELFWriter.cpp
@@ -241,7 +241,7 @@ void ELFWriter::EmitGlobal(GlobalVariable *GV) {
}
const Type *GVType = (const Type*)GV->getType();
- unsigned Align = TM.getTargetData()->getTypeAlignment(GVType);
+ unsigned Align = TM.getTargetData()->getTypeAlignmentPref(GVType);
unsigned Size = TM.getTargetData()->getTypeSize(GVType);
// If this global has a zero initializer, it is part of the .bss or common
OpenPOWER on IntegriCloud