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:
b47af25
)
Add a check to avoid allowing V->replaceAllUsesWith(V)
author
Chris Lattner
<sabre@nondot.org>
Fri, 29 Jun 2001 05:25:51 +0000
(
05:25
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 29 Jun 2001 05:25:51 +0000
(
05:25
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Value.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Value.cpp
b/lib/VMCore/Value.cpp
index 79d8e0a46205f292cf839e122648b1fb04137120..fa3c0f60fb4fe773fd44e085113b9805b33c1882 100644
(file)
--- a/
lib/VMCore/Value.cpp
+++ b/
lib/VMCore/Value.cpp
@@
-43,6
+43,7
@@
Value::~Value() {
void Value::replaceAllUsesWith(Value *D) {
assert(D && "Value::replaceAllUsesWith(<null>) is invalid!");
+ assert(D != this && "V->replaceAllUsesWith(V) is NOT valid!");
while (!Uses.empty()) {
User *Use = Uses.front();
#ifndef NDEBUG