-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[lld] Use *Set::insert_range (NFC) #133565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[lld] Use *Set::insert_range (NFC) #133565
Conversation
@llvm/pr-subscribers-platform-windows @llvm/pr-subscribers-lld-macho Author: Kazu Hirata (kazutakahirata) ChangesFull diff: https://github.com/llvm/llvm-project/pull/133565.diff 3 Files Affected:
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index bb64a5c0b9e96..9bbab524b1f9a 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -1977,8 +1977,7 @@ void LinkerDriver::linkerMain(ArrayRef<const char *> argsArr) {
// Handle /lldsavetemps
if (args.hasArg(OPT_lldsavetemps)) {
- for (const char *s : lldsaveTempsValues)
- config->saveTempsArgs.insert(s);
+ config->saveTempsArgs.insert_range(lldsaveTempsValues);
} else {
for (auto *arg : args.filtered(OPT_lldsavetemps_colon)) {
StringRef s = arg->getValue();
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 7267171635e17..0a220432333cc 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -1467,8 +1467,7 @@ static void readConfigs(Ctx &ctx, opt::InputArgList &args) {
if (args.hasArg(OPT_save_temps)) {
// --save-temps implies saving all temps.
- for (const char *s : saveTempsValues)
- ctx.arg.saveTempsArgs.insert(s);
+ ctx.arg.saveTempsArgs.insert_range(saveTempsValues);
} else {
for (auto *arg : args.filtered(OPT_save_temps_eq)) {
StringRef s = arg->getValue();
diff --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp
index 7070e92ddc4a1..bec94f830e976 100644
--- a/lld/MachO/Driver.cpp
+++ b/lld/MachO/Driver.cpp
@@ -616,8 +616,7 @@ static bool compileBitcodeFiles() {
lto->add(*bitcodeFile);
std::vector<ObjFile *> compiled = lto->compile();
- for (ObjFile *file : compiled)
- inputFiles.insert(file);
+ inputFiles.insert_range(compiled);
return !compiled.empty();
}
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/198/builds/3252 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/199/builds/2455 Here is the relevant piece of the build log for the reference
|
No description provided.