summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
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
commitfd473a746cc35d8cce96a3acb3ca1b83d9928cb2 (patch)
tree0dce0c0a03f700ba1b65df2311a7c3cc4a886d53 /llvm/lib/Analysis
parente4be4308a9b852b72a2e11e1749de1177a3f0508 (diff)
downloadbcm5719-llvm-fd473a746cc35d8cce96a3acb3ca1b83d9928cb2.tar.gz
bcm5719-llvm-fd473a746cc35d8cce96a3acb3ca1b83d9928cb2.zip
Add AssertingVH which makes PR7647 break consistently.
llvm-svn: 108401
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/InstructionSimplify.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index dbefc2dedb2..0efe183a998 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud