llvm::PassNameParser

Command-line parser that adds a selectable option for each registered pass.

Synopsis

Declared in <llvm/IR/LegacyPassNameParser.h>

class PassNameParser
    : public PassRegistrationListener
    , public cl::parser<PassInfo const*>

Description

Makes use of the pass registration mechanism to automatically add a command line argument to opt for each pass.

Base Classes

NameDescription
PassRegistrationListenerCallback interface notified when passes are registered or enumerated.
cl::parser<PassInfo const*>Default mapping parser for custom / enum-like option data types.

Type Aliases

NameDescription
parser_data_type Data type produced by a successful parse.

Member Functions

NameDescription
PassNameParser [constructor]Construct a pass-name parser bound to the given command-line option.
~PassNameParser [destructor] [virtual]Destroy the parser and unregister as a pass registration listener.
addLiteralOption Add an entry to the mapping table.
getDescription [virtual]Return the help description for alternative N.
getNumOptions [virtual]Return how many literal alternatives are registered.
getOption [virtual]Return the command-line name of alternative N.
getOptionValue [virtual]Return the stored value associated with alternative N.
ignorablePass Return true if P is not selectable, not constructible, or ignored by ignorablePassImpl.
ignorablePassImpl [virtual]Return true if P should be omitted from the option list.
initialize Initialize the base parser and add all passes registered so far.
parse Parse Arg / ArgName into V using the literal mapping table.
passEnumerate [virtual]Add P during pass enumeration by forwarding to passRegistered.
passRegistered [virtual]Add P as a literal option when a new pass is registered.
printOptionInfo [virtual]Print this option's help text after sorting the pass name table.
removeLiteralOption Remove the specified option.

Protected Types

NameDescription
OptionInfo One literal name/value/help entry in the mapping table.

Protected Data Members

NameDescription
Values Registered literal alternatives for this parser.