[PATCH] D53421: [WebAssembly] Simplify --help message

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 19 01:31:25 PDT 2018


sbc100 created this revision.
Herald added subscribers: llvm-commits, sunfish, aheejin, jgravelle-google, dschuff.

Update wasm to match EFL changes made https://reviews.llvm.org/rL33359.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D53421

Files:
  wasm/Options.td


Index: wasm/Options.td
===================================================================
--- wasm/Options.td
+++ wasm/Options.td
@@ -6,9 +6,10 @@
 class J<string name>: Joined<["--", "-"], name>;
 class S<string name>: Separate<["--", "-"], name>;
 
-multiclass Eq<string name> {
-  def "": Separate<["--", "-"], name>;
-  def _eq: Joined<["--", "-"], name # "=">, Alias<!cast<Separate>(NAME)>;
+multiclass Eq<string name, string help> {
+  def NAME: Separate<["--", "-"], name>;
+  def NAME # _eq: Joined<["--", "-"], name # "=">, Alias<!cast<Separate>(NAME)>,
+    HelpText<help>;
 }
 
 multiclass B<string name, string help1, string help2> {
@@ -86,8 +87,7 @@
 
 def threads: F<"threads">, HelpText<"Run the linker multi-threaded">;
 
-defm undefined: Eq<"undefined">,
-  HelpText<"Force undefined symbol during linking">;
+defm undefined: Eq<"undefined", "Force undefined symbol during linking">;
 
 def v: Flag<["-"], "v">, HelpText<"Display the version number">;
 
@@ -109,8 +109,7 @@
 def allow_undefined_file_s: Separate<["-"], "allow-undefined-file">,
   Alias<allow_undefined_file>;
 
-defm export: Eq<"export">,
-  HelpText<"Force a symbol to be exported">;
+defm export: Eq<"export", "Force a symbol to be exported">;
 
 def export_all: F<"export-all">,
   HelpText<"Export all symbols (normally combined with --no-gc-sections)">;
@@ -161,6 +160,5 @@
 def save_temps: F<"save-temps">;
 def thinlto_cache_dir: J<"thinlto-cache-dir=">,
   HelpText<"Path to ThinLTO cached object file directory">;
-defm thinlto_cache_policy: Eq<"thinlto-cache-policy">,
-  HelpText<"Pruning policy for the ThinLTO cache">;
+defm thinlto_cache_policy: Eq<"thinlto-cache-policy", "Pruning policy for the ThinLTO cache">;
 def thinlto_jobs: J<"thinlto-jobs=">, HelpText<"Number of ThinLTO jobs">;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53421.170160.patch
Type: text/x-patch
Size: 1789 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181019/0057bdd5/attachment.bin>


More information about the llvm-commits mailing list