We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1095105 commit d860710Copy full SHA for d860710
llvm/lib/Transforms/Vectorize/VPlanValue.h
@@ -121,18 +121,11 @@ class VPValue {
121
122
/// Remove a single \p User from the list of users.
123
void removeUser(VPUser &User) {
124
- bool Found = false;
125
// The same user can be added multiple times, e.g. because the same VPValue
126
// is used twice by the same VPUser. Remove a single one.
127
- erase_if(Users, [&User, &Found](VPUser *Other) {
128
- if (Found)
129
- return false;
130
- if (Other == &User) {
131
- Found = true;
132
- return true;
133
- }
134
135
- });
+ auto *I = find(Users, &User);
+ if (I != Users.end())
+ Users.erase(I);
136
}
137
138
typedef SmallVectorImpl<VPUser *>::iterator user_iterator;
0 commit comments