aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2024-02-13 14:34:12 +0000
committerJay Foad <jay.foad@amd.com>2024-02-13 14:34:58 +0000
commit5e5e51e9062895bed9fcf0dbb157d868be0adf8d (patch)
treee4ff2a3903d3ba698ccaac80c94346217e25341d
parentd1f510cca8e966bd1742bf17256bfec99dcdf229 (diff)
downloadllvm-5e5e51e9062895bed9fcf0dbb157d868be0adf8d.zip
llvm-5e5e51e9062895bed9fcf0dbb157d868be0adf8d.tar.gz
llvm-5e5e51e9062895bed9fcf0dbb157d868be0adf8d.tar.bz2
Make use of std::inserter. NFC.
-rw-r--r--llvm/lib/Support/DeltaAlgorithm.cpp6
-rw-r--r--llvm/utils/TableGen/AsmMatcherEmitter.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Support/DeltaAlgorithm.cpp b/llvm/lib/Support/DeltaAlgorithm.cpp
index 341de24..d763cde 100644
--- a/llvm/lib/Support/DeltaAlgorithm.cpp
+++ b/llvm/lib/Support/DeltaAlgorithm.cpp
@@ -83,9 +83,9 @@ bool DeltaAlgorithm::Search(const changeset_ty &Changes,
if (Sets.size() > 2) {
// FIXME: This is really slow.
changeset_ty Complement;
- std::set_difference(
- Changes.begin(), Changes.end(), it->begin(), it->end(),
- std::insert_iterator<changeset_ty>(Complement, Complement.begin()));
+ std::set_difference(Changes.begin(), Changes.end(), it->begin(),
+ it->end(),
+ std::inserter(Complement, Complement.begin()));
if (GetTestResult(Complement)) {
changesetlist_ty ComplementSets;
ComplementSets.insert(ComplementSets.end(), Sets.begin(), it);
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index d6dc4b7..2c2c39a 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -1269,9 +1269,9 @@ void AsmMatcherInfo::buildRegisterClasses(
}
RegisterSet Tmp;
- std::insert_iterator<RegisterSet> II(Tmp, Tmp.begin());
std::set_intersection(ContainingSet.begin(), ContainingSet.end(),
- RS.begin(), RS.end(), II, LessRecordByID());
+ RS.begin(), RS.end(),
+ std::inserter(Tmp, Tmp.begin()), LessRecordByID());
ContainingSet = std::move(Tmp);
}