26 #ifndef LLVM_IR_LEGACYPASSNAMEPARSER_H
27 #define LLVM_IR_LEGACYPASSNAMEPARSER_H
72 errs() <<
"Two passes with the same argument (-"
90 static int ValLessThan(
const PassNameParser::OptionInfo *VT1,
91 const PassNameParser::OptionInfo *VT2) {
92 return std::strcmp(VT1->Name, VT2->Name);
102 template<
typename Filter>
129 template<const
char *Args>
SmallVector< OptionInfo, 8 > Values
void enumeratePasses()
enumeratePasses - Iterate over the registered passes, calling the passEnumerate callback on each Pass...
raw_ostream & errs()
This returns a reference to a raw_ostream for standard error.
PassNameParser(cl::Option &O)
const char * getPassName() const
getPassName - Return the friendly name for the pass, never returns null
unsigned getNumOptions() const override
bool ignorablePassImpl(const PassInfo *P) const override
unsigned findOption(const char *Name)
===-------------------------------------------------------------------—===// FilteredPassNameParser c...
~PassNameParser() override
virtual void printOptionInfo(const Option &O, size_t GlobalWidth) const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
virtual bool ignorablePassImpl(const PassInfo *P) const
bool ignorablePass(const PassInfo *P) const
bool operator()(const PassInfo &P) const
NormalCtor_t getNormalCtor() const
getNormalCtor - Return a pointer to a function, that when called, creates an instance of the pass and...
void array_pod_sort(IteratorTy Start, IteratorTy End)
array_pod_sort - This sorts an array with the specified start and end extent.
void passEnumerate(const PassInfo *P) override
passEnumerate - Callback function invoked when someone calls enumeratePasses on this PassRegistration...
PassInfo class - An instance of this class exists for every pass known by the system, and can be obtained from a live Pass by calling its getPassInfo() method.
const char * getPassArgument() const
getPassArgument - Return the command line option that may be passed to 'opt' that will cause this pas...
===-------------------------------------------------------------------—===// PassArgFilter - A filter...
void printOptionInfo(const cl::Option &O, size_t GlobalWidth) const override
PassRegistrationListener class - This class is meant to be derived from by clients that are intereste...
void passRegistered(const PassInfo *P) override
Callback functions - These functions are invoked whenever a pass is loaded or removed from the curren...
void addLiteralOption(const char *Name, const DT &V, const char *HelpStr)
addLiteralOption - Add an entry to the mapping table.