From 0d955d0bf5cbbd50061309ad2c08c0dcf8f62039 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Thu, 11 Aug 2016 22:21:41 +0000 Subject: Use the range variant of find instead of unpacking begin/end If the result of the find is only used to compare against end(), just use is_contained instead. No functionality change is intended. llvm-svn: 278433 --- llvm/lib/CodeGen/LiveIntervalUnion.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/LiveIntervalUnion.cpp') diff --git a/llvm/lib/CodeGen/LiveIntervalUnion.cpp b/llvm/lib/CodeGen/LiveIntervalUnion.cpp index 025d99ce788..fc2f233f6d6 100644 --- a/llvm/lib/CodeGen/LiveIntervalUnion.cpp +++ b/llvm/lib/CodeGen/LiveIntervalUnion.cpp @@ -14,6 +14,7 @@ //===----------------------------------------------------------------------===// #include "llvm/CodeGen/LiveIntervalUnion.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SparseBitVector.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" @@ -102,9 +103,7 @@ void LiveIntervalUnion::verify(LiveVirtRegBitSet& VisitedVRegs) { // Scan the vector of interfering virtual registers in this union. Assume it's // quite small. bool LiveIntervalUnion::Query::isSeenInterference(LiveInterval *VirtReg) const { - SmallVectorImpl::const_iterator I = - std::find(InterferingVRegs.begin(), InterferingVRegs.end(), VirtReg); - return I != InterferingVRegs.end(); + return is_contained(InterferingVRegs, VirtReg); } // Collect virtual registers in this union that interfere with this -- cgit v1.2.3