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:
4baa8eb
)
Add AssertingVH which makes PR7647 break consistently.
author
Eli Friedman
<eli.friedman@gmail.com>
Thu, 15 Jul 2010 04:46:14 +0000
(
04:46
+0000)
committer
Eli Friedman
<eli.friedman@gmail.com>
Thu, 15 Jul 2010 04:46:14 +0000
(
04:46
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108401
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
patch
|
blob
|
history
diff --git
a/lib/Analysis/InstructionSimplify.cpp
b/lib/Analysis/InstructionSimplify.cpp
index dbefc2dedb2b41a5a605c4cfff9057c48536a754..0efe183a998b62cb10c01809d35fddcf50e9a313 100644
(file)
--- 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();