mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Don't insert a useless cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1527 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5ad6b8b779
commit
31b80d98ad
@ -165,8 +165,7 @@ bool RaiseAllocations::runOnBasicBlock(BasicBlock *BB) {
|
|||||||
MallocInst *MallocI = new MallocInst(PtrSByte, CI->getOperand(1),
|
MallocInst *MallocI = new MallocInst(PtrSByte, CI->getOperand(1),
|
||||||
CI->getName());
|
CI->getName());
|
||||||
CI->setName("");
|
CI->setName("");
|
||||||
BI = BIL.insert(BI, MallocI)+1;
|
ReplaceInstWithInst(BIL, BI, MallocI);
|
||||||
ReplaceInstWithInst(BIL, BI, new CastInst(MallocI, PtrSByte));
|
|
||||||
Changed = true;
|
Changed = true;
|
||||||
continue; // Skip the ++BI
|
continue; // Skip the ++BI
|
||||||
} else if (CI->getCalledValue() == FreeMeth) { // Replace call to free?
|
} else if (CI->getCalledValue() == FreeMeth) { // Replace call to free?
|
||||||
|
Loading…
Reference in New Issue
Block a user