[TableGen] Use empty() instead of checking if size of vector is greater than or equal...
authorCraig Topper <craig.topper@gmail.com>
Mon, 23 Nov 2015 07:19:08 +0000 (07:19 +0000)
committerCraig Topper <craig.topper@gmail.com>
Mon, 23 Nov 2015 07:19:08 +0000 (07:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253856 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/CodeGenDAGPatterns.cpp

index c9cc426..7d020a0 100644 (file)
@@ -159,7 +159,7 @@ bool EEVT::TypeSet::MergeInTypeInfo(const EEVT::TypeSet &InVT, TreePattern &TP){
     return true;
   }
 
-  assert(TypeVec.size() >= 1 && InVT.TypeVec.size() >= 1 && "No unknowns");
+  assert(!TypeVec.empty() && !InVT.TypeVec.empty() && "No unknowns");
 
   // Handle the abstract cases, seeing if we can resolve them better.
   switch (TypeVec[0]) {
@@ -233,6 +233,7 @@ bool EEVT::TypeSet::EnforceInteger(TreePattern &TP) {
   // If we know nothing, then get the full set.
   if (TypeVec.empty())
     return FillWithPossibleTypes(TP, isInteger, "integer");
+
   if (!hasFloatingPointTypes())
     return false;