[llvm-commits] CVS: llvm/lib/Transforms/IPO/RaiseAllocations.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Nov 8 21:11:08 PST 2004



Changes in directory llvm/lib/Transforms/IPO:

RaiseAllocations.cpp updated: 1.26 -> 1.27
---
Log message:

Fix bug: 2004-11-08-FreeUseCrash.ll 



---
Diffs of the changes:  (+3 -1)

Index: llvm/lib/Transforms/IPO/RaiseAllocations.cpp
diff -u llvm/lib/Transforms/IPO/RaiseAllocations.cpp:1.26 llvm/lib/Transforms/IPO/RaiseAllocations.cpp:1.27
--- llvm/lib/Transforms/IPO/RaiseAllocations.cpp:1.26	Sun Sep 19 23:43:34 2004
+++ llvm/lib/Transforms/IPO/RaiseAllocations.cpp	Mon Nov  8 23:10:56 2004
@@ -201,7 +201,9 @@
             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;
         }






More information about the llvm-commits mailing list