diff options
Diffstat (limited to 'llvm/utils')
-rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.h b/llvm/utils/TableGen/CodeGenTarget.h index cf4a0bbe5bd..604fe7351e8 100644 --- a/llvm/utils/TableGen/CodeGenTarget.h +++ b/llvm/utils/TableGen/CodeGenTarget.h @@ -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; |