Eliminate the remaining uses of getTypeSize. This

should only effect x86 when using long double.  Now
12/16 bytes are output for long double globals (the
exact amount depends on the alignment).  This brings
globals in line with the rest of LLVM: the space
reserved for an object is now always the ABI size.
One tricky point is that only 10 bytes should be
output for long double if it is a field in a packed
struct, which is the reason for the additional
argument to EmitGlobalConstant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43688 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands
2007-11-05 00:04:43 +00:00
parent 83430bce1d
commit ca0ed74485
16 changed files with 54 additions and 61 deletions

View File

@@ -466,7 +466,7 @@ namespace llvm {
const Type *Ty = C->getType();
if (Ty->isPrimitiveType() || Ty->isInteger()) {
unsigned Size = TM.getTargetData()->getTypeSize(Ty);
unsigned Size = TM.getTargetData()->getABITypeSize(Ty);
switch(Size) {
default: break; // Fall through to __TEXT,__const
case 4: