1include "llvm/Option/OptParser.td"
2
3multiclass BB<string name, string help1, string help2> {
4  def NAME: Flag<["--"], name>, HelpText<help1>;
5  def no_ # NAME: Flag<["--"], "no-" # name>, HelpText<help2>;
6}
7
8def help : Flag<["--"], "help">,
9  HelpText<"Prints this help output">;
10
11def h : Flag<["-"], "h">,
12  Alias<help>,
13  HelpText<"Alias for --help">;
14
15defm odr_deduplication : BB<"odr-deduplication",
16  "Do ODR deduplication for debug types(default)",
17  "Don`t do ODR deduplication for debug types">;
18
19def odr : Flag<["--"], "odr">,
20  Alias<odr_deduplication>,
21  HelpText<"Alias for --odr-deduplication">;
22
23def no_odr : Flag<["--"], "no-odr">,
24  Alias<no_odr_deduplication>,
25  HelpText<"Alias for --no-odr-deduplication">;
26
27defm garbage_collection : BB<"garbage-collection",
28  "Do garbage collection for debug info(default)",
29  "Don`t do garbage collection for debug info">;
30
31defm separate_debug_file : BB<"separate-debug-file",
32  "Create two output files: file w/o debug tables and file with debug tables",
33  "Create single output file, containing debug tables(default)">;
34
35def tombstone: Separate<["--", "-"], "tombstone">,
36  MetaVarName<"[bfd,maxpc,exec,universal]">,
37  HelpText<"Tombstone value used as a marker of invalid address(default: universal)\n"
38  "    =bfd - Zero for all addresses and [1,1] for DWARF v4 (or less) address ranges and exec\n"
39  "    =maxpc - Minus 1 for all addresses and minus 2 for DWARF v4 (or less) address ranges\n"
40  "    =exec - Match with address ranges of executable sections\n"
41  "    =universal - Both: bfd and maxpc"
42  >;
43def: Joined<["--", "-"], "tombstone=">, Alias<tombstone>;
44
45def threads: Separate<["--", "-"], "num-threads">,
46  MetaVarName<"<threads>">,
47  HelpText<"Number of available threads for multi-threaded execution. "
48  "Defaults to the number of cores on the current machine">;
49
50def: Separate<["-"], "j">,
51  Alias<threads>,
52  HelpText<"Alias for --num-threads">;
53
54def verbose : Flag<["--"], "verbose">,
55  HelpText<"Enable verbose logging">;
56
57def verify : Flag<["--"], "verify">,
58  HelpText<"Run the DWARF verifier on the resulting debug info">;
59
60def version : Flag<["--"], "version">,
61  HelpText<"Print the version and exit">;
62
63def V : Flag<["-"], "V">,
64  Alias<version>,
65  HelpText<"Alias for --version">;
66