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:
60091fa
)
Add an assertion to catch a misuse of replaceAllUsesWith
author
Chris Lattner
<sabre@nondot.org>
Thu, 21 Mar 2002 05:38:15 +0000
(
05:38
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Thu, 21 Mar 2002 05:38:15 +0000
(
05:38
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1924
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 c4327a1814dc16870bf32f71b3468def16b4a4c5..6c01f65e4e455ac663db57ed0eeefe226f2d2342 100644
(file)
--- a/
lib/VMCore/Value.cpp
+++ b/
lib/VMCore/Value.cpp
@@
-50,6
+50,8
@@
Value::~Value() {
void Value::replaceAllUsesWith(Value *D) {
assert(D && "Value::replaceAllUsesWith(<null>) is invalid!");
assert(D != this && "V->replaceAllUsesWith(V) is NOT valid!");
+ assert(D->getType() == getType() &&
+ "replaceAllUses of value with new value of different type!");
while (!Uses.empty()) {
User *Use = Uses.back();
#ifndef NDEBUG