[lld] r309089 - [ELF] - Print options aliases in --help
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 26 02:21:10 PDT 2017
Author: grimar
Date: Wed Jul 26 02:21:10 2017
New Revision: 309089
URL: http://llvm.org/viewvc/llvm-project?rev=309089&view=rev
Log:
[ELF] - Print options aliases in --help
This is PR30422,
previously LLD did not render all option aliases in --help.
With this patch it will.
Differential revision: https://reviews.llvm.org/D35477
Added:
lld/trunk/test/ELF/help.s
Modified:
lld/trunk/ELF/DriverUtils.cpp
Modified: lld/trunk/ELF/DriverUtils.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/DriverUtils.cpp?rev=309089&r1=309088&r2=309089&view=diff
==============================================================================
--- lld/trunk/ELF/DriverUtils.cpp (original)
+++ lld/trunk/ELF/DriverUtils.cpp Wed Jul 26 02:21:10 2017
@@ -116,7 +116,8 @@ opt::InputArgList ELFOptTable::parse(Arr
void elf::printHelp(const char *Argv0) {
ELFOptTable Table;
- Table.PrintHelp(outs(), Argv0, "lld", false);
+ Table.PrintHelp(outs(), Argv0, "lld", false /*ShowHidden*/,
+ true /*ShowAllAliases*/);
outs() << "\n";
// Scripts generated by Libtool versions up to at least 2.4.6 (the most
Added: lld/trunk/test/ELF/help.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/help.s?rev=309089&view=auto
==============================================================================
--- lld/trunk/test/ELF/help.s (added)
+++ lld/trunk/test/ELF/help.s Wed Jul 26 02:21:10 2017
@@ -0,0 +1,5 @@
+# RUN: ld.lld --help 2>&1 | FileCheck %s
+# CHECK: OPTIONS:
+# CHECK: --output=<value> Path to file to write output
+# CHECK: --output <value> Path to file to write output
+# CHECK: -o <path> Path to file to write output
More information about the llvm-commits
mailing list