forked from OSchip/llvm-project
[ManagedMemoryRewrite] Get size in bytes rather than in bits and dividing by 8.
llvm-svn: 311439
This commit is contained in:
parent
b9de2b4871
commit
603544863f
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue