projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
5ad6b8b
)
Don't insert a useless cast
author
Chris Lattner
<sabre@nondot.org>
Tue, 22 Jan 2002 03:30:06 +0000
(
03:30
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 22 Jan 2002 03:30:06 +0000
(
03:30
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1527
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Utils/LowerAllocations.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Utils/LowerAllocations.cpp
b/lib/Transforms/Utils/LowerAllocations.cpp
index 041d89fab17691ad35179ae9c4bdfedbd7d3d5f9..0d26e2a2336a36e4f829048a196f227959b19697 100644
(file)
--- 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?