include "llvm/Option/OptParser.td" class F : Flag<["-"], letter>, HelpText; class FF : Flag<["--"], name>, HelpText; multiclass BB { def NAME: Flag<["--"], name>, HelpText; def no_ # NAME: Flag<["--"], "no-" # name>, HelpText; } multiclass Eq { def NAME #_EQ : Joined<["--"], name #"=">, HelpText; def : Separate<["--"], name>, Alias(NAME #_EQ)>; } def debug_syms : FF<"debug-syms", "Show all symbols, even debugger only">; def defined_only : FF<"defined-only", "Show only defined symbols">; defm demangle : BB<"demangle", "Demangle C++ symbol names", "Don't demangle symbol names">; def dynamic : FF<"dynamic", "Display dynamic symbols instead of normal symbols">; def extern_only : FF<"extern-only", "Show only external symbols">; defm format : Eq<"format", "Specify output format: bsd (default), posix, sysv, darwin, just-symbols">, MetaVarName<"">; def help : FF<"help", "Display this help">; def no_llvm_bc : FF<"no-llvm-bc", "Disable LLVM bitcode reader">; def no_sort : FF<"no-sort", "Show symbols in order encountered">; def no_weak : FF<"no-weak", "Show only non-weak symbols">; def numeric_sort : FF<"numeric-sort", "Sort symbols by address">; def print_armap : FF<"print-armap", "Print the archive map">; def print_file_name : FF<"print-file-name", "Precede each symbol with the object file it came from">; def print_size : FF<"print-size", "Show symbol size as well as address">; def quiet : FF<"quiet", "Suppress 'no symbols' diagnostic">; defm radix : Eq<"radix", "Radix (o/d/x) for printing symbol Values">, MetaVarName<"">; def reverse_sort : FF<"reverse-sort", "Sort in reverse order">; def size_sort : FF<"size-sort", "Sort symbols by size">; def special_syms : FF<"special-syms", "Do not filter special symbols from the output">; def undefined_only : FF<"undefined-only", "Show only undefined symbols">; def version : FF<"version", "Display the version">; def without_aliases : FF<"without-aliases", "Exclude aliases from output">, Flags<[HelpHidden]>; // Mach-O specific options. def grp_mach_o : OptionGroup<"kind">, HelpText<"llvm-nm Mach-O Specific Options">; def add_dyldinfo : FF<"add-dyldinfo", "Add symbols from the dyldinfo not already in the symbol table">, Group; def add_inlinedinfo : FF<"add-inlinedinfo", "Add symbols from the inlined libraries, TBD only">, Group; def arch_EQ : Joined<["--"], "arch=">, HelpText<"architecture(s) from a Mach-O file to dump">, Group; def : Separate<["--", "-"], "arch">, Alias; def dyldinfo_only : FF<"dyldinfo-only", "Show only symbols from the dyldinfo">, Group; def no_dyldinfo : FF<"no-dyldinfo", "Don't add any symbols from the dyldinfo">, Group; def s : F<"s", "Dump only symbols from this segment and section name">, Group; def x : F<"x", "Print symbol entry in hex">, Group; def : FF<"just-symbol-name", "Alias for --format=just-symbols">, Alias, AliasArgs<["just-symbols"]>, Flags<[HelpHidden]>; def : FF<"portability", "Alias for --format=posix">, Alias, AliasArgs<["posix"]>; def : F<"a", "Alias for --debug-syms">, Alias; def : F<"A", "Alias for --print-file-name">, Alias; def : F<"B", "Alias for --format=bsd">, Alias, AliasArgs<["bsd"]>; def : F<"C", "Alias for --demangle">, Alias; def : F<"D", "Alias for --dynamic">, Alias; def : JoinedOrSeparate<["-"], "f">, HelpText<"Alias for --format">, Alias, MetaVarName<"">; def : F<"h", "Alias for --help">, Alias; def : F<"g", "Alias for --extern-only">, Alias; def : F<"j", "Alias for --format=just-symbols">, Alias, AliasArgs<["just-symbols"]>; def : F<"m", "Alias for --format=darwin">, Alias, AliasArgs<["darwin"]>; def : F<"M", "Deprecated alias for --print-armap">, Alias, Flags<[HelpHidden]>; def : F<"n", "Alias for --numeric-sort">, Alias; def : F<"o", "Alias for --print-file-name">, Alias; def : F<"p", "Alias for --no-sort">, Alias; def : F<"P", "Alias for --format=posix">, Alias, AliasArgs<["posix"]>; def : F<"r", "Alias for --reverse-sort">, Alias; def : F<"S", "Alias for --print-size">, Alias; def : JoinedOrSeparate<["-"], "t">, HelpText<"Alias for --radix">, Alias, MetaVarName<"">; def : F<"u", "Alias for --undefined-only">, Alias; def : F<"U", "Deprecated alias for --defined-only">, Alias, Flags<[HelpHidden]>; def : F<"v", "Alias for --numeric-sort">, Alias; def : F<"V", "Alias for --version">, Alias; def : F<"W", "Deprecated alias for --no-weak">, Alias, Flags<[HelpHidden]>;