Rename PaddedSize to AllocSize, in the hope that this
[oota-llvm.git] / lib / ExecutionEngine / Interpreter / Execution.cpp
index a79bcc2803129c41529ed56a71bf2326d9c7e0ab..765fed248f9881ab7329840eccd45c3b32a7a4aa 100644 (file)
@@ -750,7 +750,7 @@ void Interpreter::visitAllocationInst(AllocationInst &I) {
   unsigned NumElements = 
     getOperandValue(I.getOperand(0), SF).IntVal.getZExtValue();
 
-  unsigned TypeSize = (size_t)TD.getTypePaddedSize(Ty);
+  unsigned TypeSize = (size_t)TD.getTypeAllocSize(Ty);
 
   // Avoid malloc-ing zero bytes, use max()...
   unsigned MemToAlloc = std::max(1U, NumElements * TypeSize);
@@ -810,7 +810,7 @@ GenericValue Interpreter::executeGEPOperation(Value *Ptr, gep_type_iterator I,
         assert(BitWidth == 64 && "Invalid index type for getelementptr");
         Idx = (int64_t)IdxGV.IntVal.getZExtValue();
       }
-      Total += TD.getTypePaddedSize(ST->getElementType())*Idx;
+      Total += TD.getTypeAllocSize(ST->getElementType())*Idx;
     }
   }