summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-01-22 03:30:06 +0000
committerChris Lattner <sabre@nondot.org>2002-01-22 03:30:06 +0000
commit31b80d98ad2ee847edc636f15e0244dcac7e6643 (patch)
tree4f88f470792fd3ac64c609905d87f8ae5bca72a4 /lib/Transforms
parent5ad6b8b779e6d43d4edeadb960a3e17c7f6e838e (diff)
downloadllvm-31b80d98ad2ee847edc636f15e0244dcac7e6643.tar.gz
llvm-31b80d98ad2ee847edc636f15e0244dcac7e6643.tar.bz2
llvm-31b80d98ad2ee847edc636f15e0244dcac7e6643.tar.xz
Don't insert a useless cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1527 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Utils/LowerAllocations.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp
index 041d89fab1..0d26e2a233 100644
--- a/lib/Transforms/Utils/LowerAllocations.cpp
+++ b/lib/Transforms/Utils/LowerAllocations.cpp
@@ -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?