mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-02 13:21:43 +00:00
Add a check to avoid allowing V->replaceAllUsesWith(V)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b47af25099
commit
7b8ec2d752
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user