[TableGen] Use empty() instead of checking if size of vector is greater than or equal to 1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253856 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2015-11-23 07:19:08 +00:00
parent 3d6b356c19
commit e3376e6361

View 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;