mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Don't insert a useless cast
llvm-svn: 1527
This commit is contained in:
parent
819df41a64
commit
e12b9f9277
@ -165,8 +165,7 @@ bool RaiseAllocations::runOnBasicBlock(BasicBlock *BB) {
|
||||
MallocInst *MallocI = new MallocInst(PtrSByte, CI->getOperand(1),
|
||||
CI->getName());
|
||||
CI->setName("");
|
||||
BI = BIL.insert(BI, MallocI)+1;
|
||||
ReplaceInstWithInst(BIL, BI, new CastInst(MallocI, PtrSByte));
|
||||
ReplaceInstWithInst(BIL, BI, MallocI);
|
||||
Changed = true;
|
||||
continue; // Skip the ++BI
|
||||
} else if (CI->getCalledValue() == FreeMeth) { // Replace call to free?
|
||||
|
Loading…
Reference in New Issue
Block a user