1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

[TableGen] Use std::find instead of a manual loop. NFC

llvm-svn: 258017
This commit is contained in:
Craig Topper 2016-01-17 19:51:14 +00:00
parent aa011535f3
commit f11bd508b4

View File

@ -139,9 +139,7 @@ public:
/// supported by the target (i.e. there are registers that directly hold it).
bool isLegalValueType(MVT::SimpleValueType VT) const {
ArrayRef<MVT::SimpleValueType> LegalVTs = getLegalValueTypes();
for (unsigned i = 0, e = LegalVTs.size(); i != e; ++i)
if (LegalVTs[i] == VT) return true;
return false;
return std::find(LegalVTs.begin(), LegalVTs.end(), VT) != LegalVTs.end();
}
CodeGenSchedModels &getSchedModels() const;