From ceb4d1aecb9deffe59b3dcdc9a783ffde8477be9 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Mon, 12 Jan 2009 20:38:59 +0000 Subject: Rename getABITypeSize to getTypePaddedSize, as suggested by Chris. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62099 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachOWriter.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/CodeGen/MachOWriter.cpp') diff --git a/lib/CodeGen/MachOWriter.cpp b/lib/CodeGen/MachOWriter.cpp index bb15a22..ae1f0d4 100644 --- a/lib/CodeGen/MachOWriter.cpp +++ b/lib/CodeGen/MachOWriter.cpp @@ -276,7 +276,7 @@ void MachOCodeEmitter::emitConstantPool(MachineConstantPool *MCP) { // "giant object for PIC" optimization. for (unsigned i = 0, e = CP.size(); i != e; ++i) { const Type *Ty = CP[i].getType(); - unsigned Size = TM.getTargetData()->getABITypeSize(Ty); + unsigned Size = TM.getTargetData()->getTypePaddedSize(Ty); MachOWriter::MachOSection *Sec = MOW.getConstSection(CP[i].Val.ConstVal); OutputBuffer SecDataOut(Sec->SectionData, is64Bit, isLittleEndian); @@ -350,7 +350,7 @@ MachOWriter::~MachOWriter() { void MachOWriter::AddSymbolToSection(MachOSection *Sec, GlobalVariable *GV) { const Type *Ty = GV->getType()->getElementType(); - unsigned Size = TM.getTargetData()->getABITypeSize(Ty); + unsigned Size = TM.getTargetData()->getTypePaddedSize(Ty); unsigned Align = TM.getTargetData()->getPreferredAlignment(GV); // Reserve space in the .bss section for this symbol while maintaining the @@ -395,7 +395,7 @@ void MachOWriter::AddSymbolToSection(MachOSection *Sec, GlobalVariable *GV) { void MachOWriter::EmitGlobal(GlobalVariable *GV) { const Type *Ty = GV->getType()->getElementType(); - unsigned Size = TM.getTargetData()->getABITypeSize(Ty); + unsigned Size = TM.getTargetData()->getTypePaddedSize(Ty); bool NoInit = !GV->hasInitializer(); // If this global has a zero initializer, it is part of the .bss or common @@ -820,7 +820,7 @@ void MachOWriter::InitMem(const Constant *C, void *Addr, intptr_t Offset, continue; } else if (const ConstantVector *CP = dyn_cast(PC)) { unsigned ElementSize = - TD->getABITypeSize(CP->getType()->getElementType()); + TD->getTypePaddedSize(CP->getType()->getElementType()); for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i) WorkList.push_back(CPair(CP->getOperand(i), PA+i*ElementSize)); } else if (const ConstantExpr *CE = dyn_cast(PC)) { @@ -921,10 +921,10 @@ void MachOWriter::InitMem(const Constant *C, void *Addr, intptr_t Offset, abort(); } } else if (isa(PC)) { - memset((void*)PA, 0, (size_t)TD->getABITypeSize(PC->getType())); + memset((void*)PA, 0, (size_t)TD->getTypePaddedSize(PC->getType())); } else if (const ConstantArray *CPA = dyn_cast(PC)) { unsigned ElementSize = - TD->getABITypeSize(CPA->getType()->getElementType()); + TD->getTypePaddedSize(CPA->getType()->getElementType()); for (unsigned i = 0, e = CPA->getNumOperands(); i != e; ++i) WorkList.push_back(CPair(CPA->getOperand(i), PA+i*ElementSize)); } else if (const ConstantStruct *CPS = dyn_cast(PC)) { -- cgit v1.1