mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-15 09:33:39 +00:00
Add an assertion to catch a misuse of replaceAllUsesWith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1924 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
60091fa6b1
commit
150dcb9e2d
@ -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…
x
Reference in New Issue
Block a user