[PATCH] D35619: [ELF] - Introduce multiclass JSEq helper for Options.td
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 19 14:19:17 PDT 2017
ruiu added inline comments.
================
Comment at: ELF/Driver.cpp:808
switch (Arg->getOption().getID()) {
- case OPT_l:
+ case OPT_alias_library:
+ case OPT_library:
----------------
Rebase and remove this line.
================
Comment at: ELF/Options.td:10
+multiclass JSEq<string name, string help> {
+ def "" : S<name>, HelpText<help>;
----------------
Is JSEq short for Joined-Separate-EQual? That doesn't make much sense. I'd name this just `Eq`.
================
Comment at: ELF/Options.td:11
+multiclass JSEq<string name, string help> {
+ def "" : S<name>, HelpText<help>;
+ def _eq : J<name#"=">, Alias<!cast<S>(NAME)>;
----------------
Remove space before `:`.
Use the extended version as we don't need to save characters here.
def "": Separate<["--", "-"], name>;
def _eq: Joined<["--", "-"], name # "=">, Alias<!cast<Separate>(name)>;
================
Comment at: ELF/Options.td:12
+ def "" : S<name>, HelpText<help>;
+ def _eq : J<name#"=">, Alias<!cast<S>(NAME)>;
+}
----------------
NAME -> name
================
Comment at: ELF/Options.td:30
-def compress_debug_sections : J<"compress-debug-sections=">,
- HelpText<"Compress DWARF debug sections">;
+defm compress_debug_sections : JSEq<"compress-debug-sections", "Compress DWARF debug sections">;
----------------
I think it is better to remove `help` from `JSEq` and keep HelpText for each option.
https://reviews.llvm.org/D35619
More information about the llvm-commits
mailing list