mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-05 00:49:43 +00:00
[ManagedMemoryRewrite] Use unit64_t
to store size, not int
.
llvm-svn: 311440
This commit is contained in:
parent
603544863f
commit
cb5155bf6d
@ -311,7 +311,8 @@ static void rewriteAllocaAsManagedMemory(AllocaInst *Alloca,
|
||||
Builder.SetInsertPoint(Alloca);
|
||||
|
||||
Value *MallocManagedFn = getOrCreatePollyMallocManaged(*Alloca->getModule());
|
||||
const int Size = DL.getTypeAllocSize(Alloca->getType()->getElementType());
|
||||
const uint64_t Size =
|
||||
DL.getTypeAllocSize(Alloca->getType()->getElementType());
|
||||
Value *SizeVal = Builder.getInt64(Size);
|
||||
Value *RawManagedMem = Builder.CreateCall(MallocManagedFn, {SizeVal});
|
||||
Value *Bitcasted = Builder.CreateBitCast(RawManagedMem, Alloca->getType());
|
||||
|
Loading…
x
Reference in New Issue
Block a user