mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
Add an assertion to catch a misuse of replaceAllUsesWith
llvm-svn: 1924
This commit is contained in:
parent
c5c31062ab
commit
ceb4e429a2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user