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
diff --git a/llvm/lib/CodeGen/ELFWriter.cpp b/llvm/lib/CodeGen/ELFWriter.cpp
index 4f98807..3b96537 100644
--- a/llvm/lib/CodeGen/ELFWriter.cpp
+++ b/llvm/lib/CodeGen/ELFWriter.cpp
@@ -241,7 +241,7 @@
   }
 
   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