projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2fc09ae
)
Fix bug: 2004-11-08-FreeUseCrash.ll
author
Chris Lattner
<sabre@nondot.org>
Tue, 9 Nov 2004 05:10:56 +0000
(
05:10
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 9 Nov 2004 05:10:56 +0000
(
05:10
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17642
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/IPO/RaiseAllocations.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/IPO/RaiseAllocations.cpp
b/lib/Transforms/IPO/RaiseAllocations.cpp
index d91d23fd188775bcaf8969cebecb5f03731a01c0..4d5650f90aae95f927ddb9bbd950b261f4bd92e3 100644
(file)
--- a/
lib/Transforms/IPO/RaiseAllocations.cpp
+++ b/
lib/Transforms/IPO/RaiseAllocations.cpp
@@
-201,7
+201,9
@@
bool RaiseAllocations::runOnModule(Module &M) {
new BranchInst(II->getNormalDest(), I);
// Delete the old call site
- I->getParent()->getInstList().erase(I);
+ if (I->getType() != Type::VoidTy)
+ I->replaceAllUsesWith(UndefValue::get(I->getType()));
+ I->eraseFromParent();
Changed = true;
++NumRaised;
}