ADT/STLExtras: Introduce llvm::empty; NFC
This is modeled after C++17 std::empty().
Differential Revision: https://reviews.llvm.org/D53909
llvm-svn: 345679
diff --git a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
index 9e2d48d..6bb48dc 100644
--- a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
@@ -140,7 +140,7 @@
return false;
assert(ValMapping.NumBreakDowns == 1 && "Not yet implemented");
// An empty range of new register means no repairing.
- assert(NewVRegs.begin() != NewVRegs.end() && "We should not have to repair");
+ assert(!empty(NewVRegs) && "We should not have to repair");
// Assume we are repairing a use and thus, the original reg will be
// the source of the repairing.