[ManagedMemoryRewrite] Get size in bytes rather than in bits and dividing by 8.

llvm-svn: 311439
This commit is contained in:
Siddharth Bhat 2017-08-22 09:27:41 +00:00
parent b9de2b4871
commit 603544863f
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,7 @@ replaceGlobalArray(Module &M, const DataLayout &DL, GlobalVariable &Array,
BasicBlock *Start = BasicBlock::Create(M.getContext(), "entry", F);
Builder.SetInsertPoint(Start);
int ArraySizeInt = DL.getTypeAllocSizeInBits(ArrayTy) / 8;
const uint64_t ArraySizeInt = DL.getTypeAllocSize(ArrayTy);
Value *ArraySize = Builder.getInt64(ArraySizeInt);
ArraySize->setName("array.size");