mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
Use std::remove_if to remove elements from a vector
Suggested-by: Benjamin Kramer <benny.kra@gmail.com> llvm-svn: 208357
This commit is contained in:
parent
de5b0a206d
commit
7888d0c465
@ -7224,11 +7224,10 @@ static void findArrayDimensionsRec(ScalarEvolution &SE,
|
||||
}
|
||||
|
||||
// Remove all SCEVConstants.
|
||||
for (unsigned I = 0; I < Terms.size();)
|
||||
if (isa<SCEVConstant>(Terms[I]))
|
||||
Terms.erase(Terms.begin() + I);
|
||||
else
|
||||
++I;
|
||||
Terms.erase(
|
||||
std::remove_if(Terms.begin(), Terms.end(),
|
||||
[](const SCEV *E) { return isa<SCEVConstant>(E);}),
|
||||
Terms.end());
|
||||
|
||||
if (Terms.size() > 0)
|
||||
findArrayDimensionsRec(SE, Terms, Sizes, Zero, One);
|
||||
|
Loading…
Reference in New Issue
Block a user