diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 0d5b383f4b596..e19823f2ea752 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -797,7 +797,7 @@ void LinkerScript::processSectionCommands() { if (!potentialSpillLists.empty()) { DenseSet 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(base); if (!osd) diff --git a/lld/wasm/Writer.cpp b/lld/wasm/Writer.cpp index cf315de76b4ca..f4ba182ee5079 100644 --- a/lld/wasm/Writer.cpp +++ b/lld/wasm/Writer.cpp @@ -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; }