diff --git a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp index 042a8dbad6bd44..49078b9baead45 100644 --- a/llvm/lib/Transforms/IPO/HotColdSplitting.cpp +++ b/llvm/lib/Transforms/IPO/HotColdSplitting.cpp @@ -283,7 +283,7 @@ static int getOutliningPenalty(ArrayRef Region, } for (BasicBlock *SuccBB : successors(BB)) { - if (find(Region, SuccBB) == Region.end()) { + if (!is_contained(Region, SuccBB)) { NoBlocksReturn = false; SuccsOutsideRegion.insert(SuccBB); } diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp index ae4441b07c4c3e..b0ac3d31f46822 100644 --- a/llvm/lib/Transforms/IPO/Inliner.cpp +++ b/llvm/lib/Transforms/IPO/Inliner.cpp @@ -906,7 +906,7 @@ PreservedAnalyses InlinerPass::run(LazyCallGraph::SCC &InitialC, // Note that after this point, it is an error to do anything other // than use the callee's address or delete it. Callee.dropAllReferences(); - assert(find(DeadFunctions, &Callee) == DeadFunctions.end() && + assert(!is_contained(DeadFunctions, &Callee) && "Cannot put cause a function to become dead twice!"); DeadFunctions.push_back(&Callee); CalleeWasDeleted = true; diff --git a/llvm/lib/Transforms/Vectorize/VPlanValue.h b/llvm/lib/Transforms/Vectorize/VPlanValue.h index a7e874009dc4c5..b1f2439882f717 100644 --- a/llvm/lib/Transforms/Vectorize/VPlanValue.h +++ b/llvm/lib/Transforms/Vectorize/VPlanValue.h @@ -260,7 +260,7 @@ class VPDef { void removeDefinedValue(VPValue *V) { assert(V->getDef() == this && "can only remove VPValue linked with this VPDef"); - assert(find(DefinedValues, V) != DefinedValues.end() && + assert(is_contained(DefinedValues, V) && "VPValue to remove must be in DefinedValues"); erase_value(DefinedValues, V); V->Def = nullptr;