diff options
author | Duncan Sands <baldrick@free.fr> | 2009-01-12 20:38:59 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-01-12 20:38:59 +0000 |
commit | ceb4d1aecb9deffe59b3dcdc9a783ffde8477be9 (patch) | |
tree | b81070777ea57a00082bbc345c47a9499d77d24d /lib/CodeGen/MachOWriter.cpp | |
parent | ccca7fe6a30ec536de3823c0867806c1f86b2212 (diff) | |
download | external_llvm-ceb4d1aecb9deffe59b3dcdc9a783ffde8477be9.zip external_llvm-ceb4d1aecb9deffe59b3dcdc9a783ffde8477be9.tar.gz external_llvm-ceb4d1aecb9deffe59b3dcdc9a783ffde8477be9.tar.bz2 |
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
Diffstat (limited to 'lib/CodeGen/MachOWriter.cpp')
-rw-r--r-- | lib/CodeGen/MachOWriter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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<ConstantVector>(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<ConstantExpr>(PC)) { @@ -921,10 +921,10 @@ void MachOWriter::InitMem(const Constant *C, void *Addr, intptr_t Offset, abort(); } } else if (isa<ConstantAggregateZero>(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<ConstantArray>(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<ConstantStruct>(PC)) { |