aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2010-07-15 04:46:14 +0000
committerEli Friedman <eli.friedman@gmail.com>2010-07-15 04:46:14 +0000
commit3ed60a2a2253fd519a2b2e48cacce10856198b62 (patch)
tree9d7ef90e18a0c378a2f7d310bdda4bbcbddc171d
parent4baa8ebc930407affeeba452ff75d20da73bf7f2 (diff)
downloadexternal_llvm-3ed60a2a2253fd519a2b2e48cacce10856198b62.zip
external_llvm-3ed60a2a2253fd519a2b2e48cacce10856198b62.tar.gz
external_llvm-3ed60a2a2253fd519a2b2e48cacce10856198b62.tar.bz2
Add AssertingVH which makes PR7647 break consistently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108401 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Analysis/InstructionSimplify.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp
index dbefc2d..0efe183 100644
--- a/lib/Analysis/InstructionSimplify.cpp
+++ b/lib/Analysis/InstructionSimplify.cpp
@@ -443,7 +443,9 @@ void llvm::ReplaceAndSimplifyAllUses(Instruction *From, Value *To,
// 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();