21bool AuxPassArg::set(
bool NewVal) {
22 Registry->Entries[ArgIdx].Val = NewVal;
29 return Registry->Entries[ArgIdx].FlagStr;
34 auto &E = Registry->Entries[ArgIdx];
35 OS << E.FlagStr <<
" : " << E.Val;
44AuxPassArgsRegistry::Entry *AuxPassArgsRegistry::getEntry(
StringRef Flag) {
45 for (Entry &E : Entries) {
46 if (E.FlagStr == Flag)
54 Entries.emplace_back(Flag,
false);
64 Entry *E = getEntry(Part);
68 ErrSS <<
"Unsupported argument: '" << Part
69 <<
"'. List of supported args:\n";
70 for (
const auto &[ArgStr, Val] : Entries)
71 ErrSS <<
" '" << ArgStr <<
"'\n";
80 if (Entries.empty()) {
81 OS <<
"No args created yet!\n";
84 for (
const Entry &E : Entries)
85 OS << E.FlagStr <<
" : " << E.Val <<
"\n";
virtual void print(raw_ostream &OS, const Module *M) const
print - Print out the internal state of the pass.
A global registry used in conjunction with static constructors to make pluggable components (like tar...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Represent a constant reference to a string, i.e.
std::pair< StringRef, StringRef > split(char Separator) const
Split into two substrings around the first occurrence of a separator character.
This class implements an extremely fast bulk output stream that can only output to a stream.
A raw_ostream that writes to an std::string.
StringRef getFlagStr() const
LLVM_DUMP_METHOD void dump() const
void print(raw_ostream &OS) const
void print(raw_ostream &OS) const
AuxPassArg createArg(StringRef Flag)
Builder for argument with Flag.
void parse(StringRef ArgsStr)
Parse the aux argument string ArgsStr and set the values.
LLVM_DUMP_METHOD void dump() const
LLVM_ABI virtual LLVM_DUMP_METHOD void dump() const
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
LLVM_ABI void reportFatalUsageError(Error Err)
Report a fatal error that does not indicate a bug in LLVM.