Skip to content

Commit 215c1b1

Browse files
[Transforms] Use is_contained (NFC)
1 parent 2cf5310 commit 215c1b1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

llvm/lib/Transforms/IPO/HotColdSplitting.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ static int getOutliningPenalty(ArrayRef<BasicBlock *> Region,
283283
}
284284

285285
for (BasicBlock *SuccBB : successors(BB)) {
286-
if (find(Region, SuccBB) == Region.end()) {
286+
if (!is_contained(Region, SuccBB)) {
287287
NoBlocksReturn = false;
288288
SuccsOutsideRegion.insert(SuccBB);
289289
}

llvm/lib/Transforms/IPO/Inliner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC,
906906
// Note that after this point, it is an error to do anything other
907907
// than use the callee's address or delete it.
908908
Callee.dropAllReferences();
909-
assert(find(DeadFunctions, &Callee) == DeadFunctions.end() &&
909+
assert(!is_contained(DeadFunctions, &Callee) &&
910910
"Cannot put cause a function to become dead twice!");
911911
DeadFunctions.push_back(&Callee);
912912
CalleeWasDeleted = true;

llvm/lib/Transforms/Vectorize/VPlanValue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ class VPDef {
260260
void removeDefinedValue(VPValue *V) {
261261
assert(V->getDef() == this &&
262262
"can only remove VPValue linked with this VPDef");
263-
assert(find(DefinedValues, V) != DefinedValues.end() &&
263+
assert(is_contained(DefinedValues, V) &&
264264
"VPValue to remove must be in DefinedValues");
265265
erase_value(DefinedValues, V);
266266
V->Def = nullptr;

0 commit comments

Comments
 (0)