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