aboutsummaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/ExecutionEngine.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-05-09 07:06:46 +0000
committerDuncan Sands <baldrick@free.fr>2009-05-09 07:06:46 +0000
commit777d2306b36816a53bc1ae1244c0dc7d998ae691 (patch)
tree0e48f8284a5e10d4f43e51986e586740ab6eb029 /lib/ExecutionEngine/ExecutionEngine.cpp
parent09560f805ef53e5876d025dbbf63a3244e15f8a6 (diff)
Rename PaddedSize to AllocSize, in the hope that this
will make it more obvious what it represents, and stop it being confused with the StoreSize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71349 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r--lib/ExecutionEngine/ExecutionEngine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index 9cd03dac27..29a05bbbdb 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -55,7 +55,7 @@ ExecutionEngine::~ExecutionEngine() {
char* ExecutionEngine::getMemoryForGV(const GlobalVariable* GV) {
const Type *ElTy = GV->getType()->getElementType();
- size_t GVSize = (size_t)getTargetData()->getTypePaddedSize(ElTy);
+ size_t GVSize = (size_t)getTargetData()->getTypeAllocSize(ElTy);
return new char[GVSize];
}
@@ -848,16 +848,16 @@ void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) {
return;
} else if (const ConstantVector *CP = dyn_cast<ConstantVector>(Init)) {
unsigned ElementSize =
- getTargetData()->getTypePaddedSize(CP->getType()->getElementType());
+ getTargetData()->getTypeAllocSize(CP->getType()->getElementType());
for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i)
InitializeMemory(CP->getOperand(i), (char*)Addr+i*ElementSize);
return;
} else if (isa<ConstantAggregateZero>(Init)) {
- memset(Addr, 0, (size_t)getTargetData()->getTypePaddedSize(Init->getType()));
+ memset(Addr, 0, (size_t)getTargetData()->getTypeAllocSize(Init->getType()));
return;
} else if (const ConstantArray *CPA = dyn_cast<ConstantArray>(Init)) {
unsigned ElementSize =
- getTargetData()->getTypePaddedSize(CPA->getType()->getElementType());
+ getTargetData()->getTypeAllocSize(CPA->getType()->getElementType());
for (unsigned i = 0, e = CPA->getNumOperands(); i != e; ++i)
InitializeMemory(CPA->getOperand(i), (char*)Addr+i*ElementSize);
return;
@@ -1004,7 +1004,7 @@ void ExecutionEngine::EmitGlobalVariable(const GlobalVariable *GV) {
InitializeMemory(GV->getInitializer(), GA);
const Type *ElTy = GV->getType()->getElementType();
- size_t GVSize = (size_t)getTargetData()->getTypePaddedSize(ElTy);
+ size_t GVSize = (size_t)getTargetData()->getTypeAllocSize(ElTy);
NumInitBytes += (unsigned)GVSize;
++NumGlobals;
}