[IR] Simplify removeDeadConstantUsers. NFC

llvm-svn: 368833
This commit is contained in:
Fangrui Song 2019-08-14 11:38:45 +00:00
parent 030409020c
commit 4c8deb6172
1 changed files with 3 additions and 6 deletions

View File

@ -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);
}
}