aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/TableGen/CodeGenTarget.h
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-08-11 22:21:41 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-08-11 22:21:41 +0000
commit0d955d0bf5cbbd50061309ad2c08c0dcf8f62039 (patch)
tree19991ceb4f16b4e3ce06fe2c39304d27a93b8b7b /llvm/utils/TableGen/CodeGenTarget.h
parent332b3b22109e9c0d84456888150c0a30f378f984 (diff)
downloadllvm-0d955d0bf5cbbd50061309ad2c08c0dcf8f62039.zip
llvm-0d955d0bf5cbbd50061309ad2c08c0dcf8f62039.tar.gz
llvm-0d955d0bf5cbbd50061309ad2c08c0dcf8f62039.tar.bz2
Use the range variant of find instead of unpacking begin/end
If the result of the find is only used to compare against end(), just use is_contained instead. No functionality change is intended. llvm-svn: 278433
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.h')
-rw-r--r--llvm/utils/TableGen/CodeGenTarget.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.h b/llvm/utils/TableGen/CodeGenTarget.h
index 85a8c1b..b16750c 100644
--- a/llvm/utils/TableGen/CodeGenTarget.h
+++ b/llvm/utils/TableGen/CodeGenTarget.h
@@ -139,7 +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();
- return std::find(LegalVTs.begin(), LegalVTs.end(), VT) != LegalVTs.end();
+ return is_contained(LegalVTs, VT);
}
CodeGenSchedModels &getSchedModels() const;