mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
make the prototypes for CreateMalloc and CreateFree more consistent. Patch
by Hans Vandierendonck from PR7605 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108116 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1307,7 +1307,7 @@ static GlobalVariable *PerformHeapAllocSRoA(GlobalVariable *GV, CallInst *CI,
|
||||
const Type *IntPtrTy = TD->getIntPtrType(CI->getContext());
|
||||
Value *NMI = CallInst::CreateMalloc(CI, IntPtrTy, FieldTy,
|
||||
ConstantInt::get(IntPtrTy, TypeSize),
|
||||
NElems,
|
||||
NElems, 0,
|
||||
CI->getName() + ".f" + Twine(FieldNo));
|
||||
FieldMallocs.push_back(NMI);
|
||||
new StoreInst(NMI, NGV, CI);
|
||||
@@ -1536,7 +1536,7 @@ static bool TryToOptimizeStoreOfMallocToGlobal(GlobalVariable *GV,
|
||||
Value *NumElements = ConstantInt::get(IntPtrTy, AT->getNumElements());
|
||||
Instruction *Malloc = CallInst::CreateMalloc(CI, IntPtrTy, AllocSTy,
|
||||
AllocSize, NumElements,
|
||||
CI->getName());
|
||||
0, CI->getName());
|
||||
Instruction *Cast = new BitCastInst(Malloc, CI->getType(), "tmp", CI);
|
||||
CI->replaceAllUsesWith(Cast);
|
||||
CI->eraseFromParent();
|
||||
|
||||
Reference in New Issue
Block a user