[llvm] r253856 - [TableGen] Use empty() instead of checking if size of vector is greater than or equal to 1.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 22 23:19:08 PST 2015
Author: ctopper
Date: Mon Nov 23 01:19:08 2015
New Revision: 253856
URL: http://llvm.org/viewvc/llvm-project?rev=253856&view=rev
Log:
[TableGen] Use empty() instead of checking if size of vector is greater than or equal to 1.
Modified:
llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
Modified: llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp?rev=253856&r1=253855&r2=253856&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenDAGPatterns.cpp Mon Nov 23 01:19:08 2015
@@ -159,7 +159,7 @@ bool EEVT::TypeSet::MergeInTypeInfo(cons
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(TreeP
// If we know nothing, then get the full set.
if (TypeVec.empty())
return FillWithPossibleTypes(TP, isInteger, "integer");
+
if (!hasFloatingPointTypes())
return false;
More information about the llvm-commits
mailing list