[llvm-commits] [llvm] r108401 - /llvm/trunk/lib/Analysis/InstructionSimplify.cpp

Eli Friedman eli.friedman at gmail.com
Wed Jul 14 21:46:14 PDT 2010


Author: efriedma
Date: Wed Jul 14 23:46:14 2010
New Revision: 108401

URL: http://llvm.org/viewvc/llvm-project?rev=108401&view=rev
Log:
Add AssertingVH which makes PR7647 break consistently.


Modified:
    llvm/trunk/lib/Analysis/InstructionSimplify.cpp

Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=108401&r1=108400&r2=108401&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original)
+++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Wed Jul 14 23:46:14 2010
@@ -443,7 +443,9 @@
   // FromHandle - This keeps a weakvh on the from value so that we can know if
   // it gets deleted out from under us in a recursive simplification.
   WeakVH FromHandle(From);
-  
+  // Double-check that To isn't deleted.
+  AssertingVH<> CheckedTo = To;
+
   while (!From->use_empty()) {
     // Update the instruction to use the new value.
     Use &U = From->use_begin().getUse();





More information about the llvm-commits mailing list