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 | 50ee0e40e553cbf2ce4eb920d7e2cb264f927438 (patch) | |
tree | 66423d72e856a6b3c463e21c0bb7241e7183c60e /llvm/lib/CodeGen/ELFWriter.cpp | |
parent | 7476fa445672333a766866debf2fed569dd408d9 (diff) | |
download | bcm5719-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.cpp | 2 |
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 |