diff options
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r-- | lib/ExecutionEngine/ExecutionEngine.cpp | 10 | ||||
-rw-r--r-- | lib/ExecutionEngine/Interpreter/Execution.cpp | 4 | ||||
-rw-r--r-- | lib/ExecutionEngine/JIT/JIT.cpp | 2 | ||||
-rw-r--r-- | lib/ExecutionEngine/JIT/JITEmitter.cpp | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index d89a9bb4ac..72db4e4360 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/lib/ExecutionEngine/ExecutionEngine.cpp @@ -735,7 +735,7 @@ void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) { return; } else if (const ConstantVector *CP = dyn_cast<ConstantVector>(Init)) { unsigned ElementSize = - getTargetData()->getTypeSize(CP->getType()->getElementType()); + getTargetData()->getABITypeSize(CP->getType()->getElementType()); for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i) InitializeMemory(CP->getOperand(i), (char*)Addr+i*ElementSize); return; @@ -744,7 +744,7 @@ void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) { StoreValueToMemory(Val, (GenericValue*)Addr, Init->getType()); return; } else if (isa<ConstantAggregateZero>(Init)) { - memset(Addr, 0, (size_t)getTargetData()->getTypeSize(Init->getType())); + memset(Addr, 0, (size_t)getTargetData()->getABITypeSize(Init->getType())); return; } @@ -752,7 +752,7 @@ void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) { case Type::ArrayTyID: { const ConstantArray *CPA = cast<ConstantArray>(Init); unsigned ElementSize = - getTargetData()->getTypeSize(CPA->getType()->getElementType()); + getTargetData()->getABITypeSize(CPA->getType()->getElementType()); for (unsigned i = 0, e = CPA->getNumOperands(); i != e; ++i) InitializeMemory(CPA->getOperand(i), (char*)Addr+i*ElementSize); return; @@ -843,7 +843,7 @@ void ExecutionEngine::emitGlobals() { const Type *Ty = I->getType()->getElementType(); // Allocate some memory for it! - unsigned Size = TD->getTypeSize(Ty); + unsigned Size = TD->getABITypeSize(Ty); addGlobalMapping(I, new char[Size]); } else { // External variable reference. Try to use the dynamic loader to @@ -897,7 +897,7 @@ void ExecutionEngine::EmitGlobalVariable(const GlobalVariable *GV) { DOUT << "Global '" << GV->getName() << "' -> " << GA << "\n"; const Type *ElTy = GV->getType()->getElementType(); - size_t GVSize = (size_t)getTargetData()->getTypeSize(ElTy); + size_t GVSize = (size_t)getTargetData()->getABITypeSize(ElTy); if (GA == 0) { // If it's not already specified, allocate memory for the global. GA = new char[GVSize]; diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index f11cf816b2..6ab123125f 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -746,7 +746,7 @@ void Interpreter::visitAllocationInst(AllocationInst &I) { unsigned NumElements = getOperandValue(I.getOperand(0), SF).IntVal.getZExtValue(); - unsigned TypeSize = (size_t)TD.getTypeSize(Ty); + unsigned TypeSize = (size_t)TD.getABITypeSize(Ty); // Avoid malloc-ing zero bytes, use max()... unsigned MemToAlloc = std::max(1U, NumElements * TypeSize); @@ -806,7 +806,7 @@ GenericValue Interpreter::executeGEPOperation(Value *Ptr, gep_type_iterator I, Idx = (int64_t)IdxGV.IntVal.getZExtValue(); else assert(0 && "Invalid index type for getelementptr"); - Total += TD.getTypeSize(ST->getElementType())*Idx; + Total += TD.getABITypeSize(ST->getElementType())*Idx; } } diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index 640520f313..5b04124cd0 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/lib/ExecutionEngine/JIT/JIT.cpp @@ -337,7 +337,7 @@ void *JIT::getOrEmitGlobalVariable(const GlobalVariable *GV) { // actually initialize the global after current function has finished // compilation. const Type *GlobalType = GV->getType()->getElementType(); - size_t S = getTargetData()->getTypeSize(GlobalType); + size_t S = getTargetData()->getABITypeSize(GlobalType); size_t A = getTargetData()->getPrefTypeAlignment(GlobalType); if (A <= 8) { Ptr = malloc(S); diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index b7af521dd9..eab322cce4 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -899,7 +899,7 @@ void JITEmitter::emitConstantPool(MachineConstantPool *MCP) { unsigned Size = CPE.Offset; const Type *Ty = CPE.isMachineConstantPoolEntry() ? CPE.Val.MachineCPVal->getType() : CPE.Val.ConstVal->getType(); - Size += TheJIT->getTargetData()->getTypeSize(Ty); + Size += TheJIT->getTargetData()->getABITypeSize(Ty); ConstantPoolBase = allocateSpace(Size, 1 << MCP->getConstantPoolAlignment()); ConstantPool = MCP; |