10 #include "llvm/TableGen/Record.h"
20 return def->getValueAsString(
"cppName");
24 return def->getValueAsString(
"argument");
30 StringRef defaultVal = def->getValueAsString(
"defaultValue");
31 return defaultVal.empty() ? std::optional<StringRef>() : defaultVal;
35 return def->getValueAsString(
"description");
39 StringRef additionalFlags = def->getValueAsString(
"additionalOptFlags");
40 return additionalFlags.empty() ? std::optional<StringRef>() : additionalFlags;
44 return def->isSubClassOf(
"ListOption");
52 return def->getValueAsString(
"cppName");
56 return def->getValueAsString(
"name");
60 return def->getValueAsString(
"description");
68 for (
auto *init : def->getValueAsListOfDefs(
"options"))
69 options.emplace_back(init);
70 for (
auto *init : def->getValueAsListOfDefs(
"statistics"))
71 statistics.emplace_back(init);
72 for (StringRef dialect : def->getValueAsListOfStrings(
"dependentDialects"))
73 dependentDialects.push_back(dialect);
77 return def->getValueAsString(
"argument");
81 return def->getValueAsString(
"baseClass");
87 return def->getValueAsString(
"description");
91 return def->getValueAsString(
"constructor");
95 return dependentDialects;
StringRef getType() const
Return the C++ type of the option.
std::optional< StringRef > getDefaultValue() const
Return the default value of the option.
StringRef getCppVariableName() const
Return the name for the C++ option variable.
StringRef getDescription() const
Return the description for this option.
StringRef getArgument() const
Return the command line argument to use for this option.
bool isListOption() const
Flag indicating if this is a list option.
std::optional< StringRef > getAdditionalFlags() const
Return the additional flags passed to the option constructor.
StringRef getName() const
Return the name of the statistic.
StringRef getCppVariableName() const
Return the name for the C++ statistic variable.
StringRef getDescription() const
Return the description for this statistic.
ArrayRef< PassStatistic > getStatistics() const
Return the statistics provided by this pass.
StringRef getArgument() const
Return the command line argument of the pass.
ArrayRef< StringRef > getDependentDialects() const
Return the dialects this pass needs to be registered.
StringRef getConstructor() const
Return the C++ constructor call to create an instance of this pass.
StringRef getDescription() const
Return the description of the pass.
StringRef getBaseClass() const
Return the name for the C++ base class.
Pass(const llvm::Record *def)
StringRef getSummary() const
Return the short 1-line summary of the pass.
ArrayRef< PassOption > getOptions() const
Return the options provided by this pass.
Include the generated interface declarations.