1// Include the common option parsing interfaces. 2include "llvm/Option/OptParser.td" 3 4class FF<string name, string help>: Flag<["-", "--"], name>, HelpText<help>; 5multiclass JS<string name, string help, string var = ""> { 6 def NAME #_EQ : Joined<["--"], name #"=">, HelpText<help>, MetaVarName<var>; 7 def : Separate<["-", "--"], name>, Alias<!cast<Joined>(NAME #_EQ)>; 8} 9 10// 11// Top level operations 12// 13def action_group : OptionGroup<"action group">, HelpText<"COMMANDS">; 14def compare : FF<"compare", "compare tapi files for library differences">, Group<action_group>; 15def merge : FF<"merge", "merge the input files that represent the same library">, Group<action_group>; 16def extract: FF<"extract", "extract <architecture> from input file">, Group<action_group>; 17def remove: FF<"remove", "remove <architecture> from input file">, Group<action_group>; 18def stubify: FF<"stubify", "create a tapi file from a dynamic library or framework">, Group<action_group>; 19 20// 21// General Driver options 22// 23def help : FF<"help", "display this help">; 24def version: FF<"version", "print the llvm-readtapi version">; 25def v: FF<"v", "alias for --version">, Alias<version>; 26defm output: JS<"o", "write output to <file>","<file>">; 27def compact: FF<"compact", "write compact tapi output file">; 28defm filetype: JS<"filetype", "specify the output file type (tbd-v3, tbd-v4 or tbd-v5)","<value>">; 29defm arch: JS<"arch", "specify the <architecture>", "<architecture>">; 30 31// 32// Stub options 33// 34def delete_input : FF<"delete-input", "delete and replace input file on success">; 35def delete_private_libraries : FF<"delete-private-libraries", "delete private system dynamic libraries and frameworks">; 36def t: FF<"t", "logs each library loaded, useful for debugging problems with search paths where the wrong library is loaded">; 37 38 39// 40// Compare options 41// 42defm ignore_arch : JS<"ignore-arch", "<architecture> slice to ignore for comparison", "<architecture>">; 43