summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/COFF/DriverUtils.cpp3
-rw-r--r--lld/ELF/DriverUtils.cpp5
-rw-r--r--lld/wasm/Driver.cpp3
3 files changed, 4 insertions, 7 deletions
diff --git a/lld/COFF/DriverUtils.cpp b/lld/COFF/DriverUtils.cpp
index e2ac2882f60..07783b51c51 100644
--- a/lld/COFF/DriverUtils.cpp
+++ b/lld/COFF/DriverUtils.cpp
@@ -773,8 +773,7 @@ std::vector<const char *> ArgParser::tokenize(StringRef S) {
}
void printHelp(const char *Argv0) {
- COFFOptTable Table;
- Table.PrintHelp(outs(), Argv0, "LLVM Linker", false);
+ COFFOptTable().PrintHelp(outs(), Argv0, "LLVM Linker", false);
}
} // namespace coff
diff --git a/lld/ELF/DriverUtils.cpp b/lld/ELF/DriverUtils.cpp
index 9fa6f620abc..2f7c9228851 100644
--- a/lld/ELF/DriverUtils.cpp
+++ b/lld/ELF/DriverUtils.cpp
@@ -114,9 +114,8 @@ opt::InputArgList ELFOptTable::parse(ArrayRef<const char *> Argv) {
}
void elf::printHelp(const char *Argv0) {
- ELFOptTable Table;
- Table.PrintHelp(outs(), Argv0, "lld", false /*ShowHidden*/,
- true /*ShowAllAliases*/);
+ ELFOptTable().PrintHelp(outs(), Argv0, "lld", false /*ShowHidden*/,
+ true /*ShowAllAliases*/);
outs() << "\n";
// Scripts generated by Libtool versions up to at least 2.4.6 (the most
diff --git a/lld/wasm/Driver.cpp b/lld/wasm/Driver.cpp
index 1ba07df0317..97ec262be30 100644
--- a/lld/wasm/Driver.cpp
+++ b/lld/wasm/Driver.cpp
@@ -143,8 +143,7 @@ static void addSyntheticUndefinedFunction(StringRef Name,
}
static void printHelp(const char *Argv0) {
- WasmOptTable Table;
- Table.PrintHelp(outs(), Argv0, "LLVM Linker", false);
+ WasmOptTable().PrintHelp(outs(), Argv0, "LLVM Linker", false);
}
WasmOptTable::WasmOptTable() : OptTable(OptInfo) {}
OpenPOWER on IntegriCloud