include "llvm/Option/OptParser.td" multiclass B { 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)>; } class F: Flag<["--", "-"], name>, HelpText; def addresses : F<"addresses", "Show address before line information">; defm adjust_vma : Eq<"adjust-vma", "Add specified offset to object file addresses">, MetaVarName<"">; def basenames : Flag<["--"], "basenames">, HelpText<"Strip directory names from paths">; defm debug_file_directory : Eq<"debug-file-directory", "Path to directory where to look for debug files">, MetaVarName<"">; defm default_arch : Eq<"default-arch", "Default architecture (for multi-arch objects)">; defm demangle : B<"demangle", "Demangle function names", "Don't demangle function names">; def functions : F<"functions", "Print function name for a given address">; def functions_EQ : Joined<["--"], "functions=">, HelpText<"Print function name for a given address">, Values<"none,short,linkage">; def help : F<"help", "Display this help">; defm dwp : Eq<"dwp", "Path to DWP file to be use for any split CUs">, MetaVarName<"">; defm dsym_hint : Eq<"dsym-hint", "Path to .dSYM bundles to search for debug info for the object files">, MetaVarName<"">; defm fallback_debug_path : Eq<"fallback-debug-path", "Fallback path for debug binaries">, MetaVarName<"">; defm inlines : B<"inlines", "Print all inlined frames for a given address", "Do not print inlined frames">; defm obj : Eq<"obj", "Path to object file to be symbolized (if not provided, " "object file should be specified for each input line)">, MetaVarName<"">; defm output_style : Eq<"output-style", "Specify print style. Supported styles: LLVM, GNU">, MetaVarName<"style">, Values<"LLVM,GNU">; def pretty_print : F<"pretty-print", "Make the output more human friendly">; defm print_source_context_lines : Eq<"print-source-context-lines", "Print N lines of source file context">; def relative_address : F<"relative-address", "Interpret addresses as addresses relative to the image base">; def relativenames : F<"relativenames", "Strip the compilation directory from paths">; defm untag_addresses : B<"untag-addresses", "", "Remove memory tags from addresses before symbolization">; def use_dia: F<"dia", "Use the DIA library to access symbols (Windows only)">; def verbose : F<"verbose", "Print verbose line info">; def version : F<"version", "Display the version">; def : Flag<["-"], "a">, Alias, HelpText<"Alias for --addresses">; def : F<"print-address", "Alias for --addresses">, Alias; def : Flag<["-"], "C">, Alias, HelpText<"Alias for --demangle">; def : Joined<["--"], "exe=">, Alias, HelpText<"Alias for --obj">, MetaVarName<"">; def : Separate<["--"], "exe">, Alias, HelpText<"Alias for --obj">, MetaVarName<"">; def : JoinedOrSeparate<["-"], "e">, Alias, HelpText<"Alias for --obj">, MetaVarName<"">; def : Joined<["-"], "e=">, Alias, HelpText<"Alias for --obj">, MetaVarName<"">; def : Flag<["-"], "f">, Alias, HelpText<"Alias for --functions">; def : Joined<["-"], "f=">, Alias, HelpText<"Alias for --functions=">; def : Flag<["-"], "h">, Alias; def : Flag<["-"], "i">, Alias, HelpText<"Alias for --inlines">; def : F<"inlining", "Alias for --inlines">, Alias; def : Flag<["-"], "p">, Alias, HelpText<"Alias for --pretty-print">; def : Flag<["-"], "s">, Alias, HelpText<"Alias for --basenames">; def : Flag<["-"], "v">, Alias, HelpText<"Alias for --version">; // Compatibility aliases for old asan_symbolize.py and sanitizer binaries (before 2020-08). def : Flag<["--"], "inlining=true">, Alias, HelpText<"Alias for --inlines">; def : Flag<["--"], "inlining=false">, Alias, HelpText<"Alias for --no-inlines">; // Compatibility aliases for pprof's symbolizer. def : Flag<["-"], "demangle=true">, Alias, HelpText<"Alias for --demangle">; def : Flag<["-"], "demangle=false">, Alias, HelpText<"Alias for --no-demangle">; // Compatibility no-op options. def : Flag<["--"], "use-symbol-table=true">;