forked from OSchip/llvm-project
[IR] Simplify removeDeadConstantUsers. NFC
llvm-svn: 368833
This commit is contained in:
parent
030409020c
commit
4c8deb6172
|
@ -575,13 +575,10 @@ void Constant::removeDeadConstantUsers() const {
|
|||
}
|
||||
|
||||
// If the constant was dead, then the iterator is invalidated.
|
||||
if (LastNonDeadUser == E) {
|
||||
if (LastNonDeadUser == E)
|
||||
I = user_begin();
|
||||
if (I == E) break;
|
||||
} else {
|
||||
I = LastNonDeadUser;
|
||||
++I;
|
||||
}
|
||||
else
|
||||
I = std::next(LastNonDeadUser);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue