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

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 22 01:36:49 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL344887: [WebAssembly] Simplify --help message (authored by sbc, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D53421

Files:
  lld/trunk/wasm/Options.td


Index: lld/trunk/wasm/Options.td
===================================================================
--- lld/trunk/wasm/Options.td
+++ lld/trunk/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.170375.patch
Type: text/x-patch
Size: 1819 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181022/5c439482/attachment.bin>


More information about the llvm-commits mailing list