summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-08-12 03:55:06 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-08-12 03:55:06 +0000
commit42531260b3e0cc6256bd64911fc3db7aea59a68e (patch)
treebb5d1b3e84331a2673079b42a25135d177d5f8e4 /llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
parent1a2cb97f7b6b0a3ad14c7f076b10a1a19834fac7 (diff)
downloadbcm5719-llvm-42531260b3e0cc6256bd64911fc3db7aea59a68e.tar.gz
bcm5719-llvm-42531260b3e0cc6256bd64911fc3db7aea59a68e.zip
Use the range variant of find/find_if 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: 278469
Diffstat (limited to 'llvm/utils/TableGen/FixedLenDecoderEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/FixedLenDecoderEmitter.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp b/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
index 1200324d6b0..733c7549b2c 100644
--- a/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
+++ b/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp
@@ -1108,9 +1108,7 @@ unsigned FilterChooser::getDecoderIndex(DecoderSet &Decoders,
// Make sure the predicate is in the table.
Decoders.insert(StringRef(Decoder));
// Now figure out the index for when we write out the table.
- DecoderSet::const_iterator P = std::find(Decoders.begin(),
- Decoders.end(),
- Decoder.str());
+ DecoderSet::const_iterator P = find(Decoders, Decoder.str());
return (unsigned)(P - Decoders.begin());
}
@@ -1183,9 +1181,7 @@ unsigned FilterChooser::getPredicateIndex(DecoderTableInfo &TableInfo,
// Make sure the predicate is in the table.
TableInfo.Predicates.insert(Predicate.str());
// Now figure out the index for when we write out the table.
- PredicateSet::const_iterator P = std::find(TableInfo.Predicates.begin(),
- TableInfo.Predicates.end(),
- Predicate.str());
+ PredicateSet::const_iterator P = find(TableInfo.Predicates, Predicate.str());
return (unsigned)(P - TableInfo.Predicates.begin());
}
OpenPOWER on IntegriCloud