// emit it into memory. It goes in the same array as the generated
// code, jump tables, etc.
const Type *GlobalType = GV->getType()->getElementType();
- size_t S = getTargetData()->getTypePaddedSize(GlobalType);
+ size_t S = getTargetData()->getTypeAllocSize(GlobalType);
size_t A = getTargetData()->getPreferredAlignment(GV);
if (GV->isThreadLocal()) {
MutexGuard locked(lock);
///
char* JIT::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);
if (GV->isThreadLocal()) {
MutexGuard locked(lock);
return TJI.allocateThreadLocalMemory(GVSize);