mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-21 19:57:00 +00:00
[lld] Use *Set::insert_range (NFC) (#132590)
DenseSet, SmallPtrSet, SmallSet, SetVector, and StringSet recently gained C++23-style insert_range. This patch replaces: Dest.insert(Src.begin(), Src.end()); with: Dest.insert_range(Src);
This commit is contained in:
parent
441c9a9273
commit
00cb966209
lld
@ -797,7 +797,7 @@ void LinkerScript::processSectionCommands() {
|
||||
if (!potentialSpillLists.empty()) {
|
||||
DenseSet<StringRef> insertNames;
|
||||
for (InsertCommand &ic : insertCommands)
|
||||
insertNames.insert(ic.names.begin(), ic.names.end());
|
||||
insertNames.insert_range(ic.names);
|
||||
for (SectionCommand *&base : sectionCommands) {
|
||||
auto *osd = dyn_cast<OutputDesc>(base);
|
||||
if (!osd)
|
||||
|
@ -588,7 +588,7 @@ void Writer::populateTargetFeatures() {
|
||||
|
||||
if (ctx.arg.extraFeatures.has_value()) {
|
||||
auto &extraFeatures = *ctx.arg.extraFeatures;
|
||||
allowed.insert(extraFeatures.begin(), extraFeatures.end());
|
||||
allowed.insert_range(extraFeatures);
|
||||
}
|
||||
|
||||
// Only infer used features if user did not specify features
|
||||
@ -596,7 +596,7 @@ void Writer::populateTargetFeatures() {
|
||||
|
||||
if (!inferFeatures) {
|
||||
auto &explicitFeatures = *ctx.arg.features;
|
||||
allowed.insert(explicitFeatures.begin(), explicitFeatures.end());
|
||||
allowed.insert_range(explicitFeatures);
|
||||
if (!ctx.arg.checkFeatures)
|
||||
goto done;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user