mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 02:56:05 +00:00

llvm-cxxfilt can demangle names of data symbols, in addition to function names. $ llvm-cxxfilt _ZN6garden5gnomeE garden::gnome And type names too, on request: $ llvm-cxxfilt -t i int Update some overly specific the wording in the --help and documentation that suggests otherwise.
32 lines
1.4 KiB
TableGen
32 lines
1.4 KiB
TableGen
include "llvm/Option/OptParser.td"
|
|
|
|
class F<string letter, string help> : Flag<["-"], letter>, HelpText<help>;
|
|
class FF<string name, string help> : Flag<["--"], name>, HelpText<help>;
|
|
|
|
multiclass BB<string name, string help1, string help2> {
|
|
def NAME: Flag<["--"], name>, HelpText<help1>;
|
|
def no_ # NAME: Flag<["--"], "no-" # name>, HelpText<help2>;
|
|
}
|
|
|
|
multiclass Eq<string name, string help> {
|
|
def NAME #_EQ : Joined<["--"], name #"=">,
|
|
HelpText<help>;
|
|
def : Separate<["--"], name>, Alias<!cast<Joined>(NAME #_EQ)>;
|
|
}
|
|
|
|
def help : FF<"help", "Display this help">;
|
|
def quote : FF<"quote", "Quote demangled names with \" \" if not already quoted">;
|
|
defm strip_underscore : BB<"strip-underscore", "Strip the leading underscore", "Don't strip the leading underscore">;
|
|
def types : FF<"types", "Attempt to demangle types as well as symbol names">;
|
|
def no_params : FF<"no-params", "Skip function parameters and return types">;
|
|
def version : FF<"version", "Display the version">;
|
|
|
|
defm : Eq<"format", "Specify mangling format. Currently ignored because only 'gnu' is supported">;
|
|
def : F<"s", "Alias for --format">;
|
|
|
|
def : F<"_", "Alias for --strip-underscore">, Alias<strip_underscore>;
|
|
def : F<"h", "Alias for --help">, Alias<help>;
|
|
def : F<"n", "Alias for --no-strip-underscore">, Alias<no_strip_underscore>;
|
|
def : F<"p", "Alias for --no-params">, Alias<no_params>;
|
|
def : F<"t", "Alias for --types">, Alias<types>;
|