1
0
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:
Chris Lattner 2002-01-22 03:30:06 +00:00
parent 819df41a64
commit e12b9f9277

View File

@ -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?