1#ifndef LLVM_TABLEGEN_DIRECTIVEEMITTER_H
2#define LLVM_TABLEGEN_DIRECTIVEEMITTER_H
20 const auto &DirectiveLanguages = getDirectiveLanguages();
21 Def = DirectiveLanguages[0];
68 std::vector<Record *> getDirectiveLanguages()
const {
89 std::string
N =
Name.str();
90 std::replace(
N.begin(),
N.end(),
' ',
'_');
149 std::string
N =
Name.str();
151 std::transform(
N.begin(),
N.end(),
N.begin(), [&Cap](
unsigned char C) {
153 C = llvm::toUpper(C);
155 }
else if (
C ==
'_') {
166 return Def->getValueAsString(
"enumClauseValue");
170 return Def->getValueAsListOfDefs(
"allowedClauseValues");
175 bool isValueList()
const {
return Def->getValueAsBit(
"isValueList"); }
178 return Def->getValueAsString(
"defaultValue");
181 bool isImplicit()
const {
return Def->getValueAsBit(
"isImplicit"); }
184 return Def->getValueAsListOfStrings(
"aliases");
190 return Def->getValueAsBit(
"isPrefixOptional");
215 int getValue()
const {
return Def->getValueAsInt(
"value"); }
std::string getFormattedName()
StringRef getRecordName() const
StringRef getName() const
StringRef getAlternativeName() const
BaseRecord(const llvm::Record *Def)
ClauseVal(const llvm::Record *Def)
bool isUserVisible() const
StringRef getClangClass() const
StringRef getDefaultValue() const
bool isValueOptional() const
StringRef getFlangClass() const
std::vector< StringRef > getAliases() const
std::vector< Record * > getClauseVals() const
StringRef getEnumName() const
bool isPrefixOptional() const
std::string getFormattedParserClassName()
Clause(const llvm::Record *Def)
StringRef getPrefix() const
bool hasMakeEnumAvailableInNamespace() const
bool HasValidityErrors() const
StringRef getClausePrefix() const
std::vector< Record * > getDirectives() const
StringRef getClauseEnumSetClass() const
std::vector< Record * > getClauses() const
StringRef getName() const
DirectiveLanguage(const llvm::RecordKeeper &Records)
StringRef getDirectivePrefix() const
bool hasEnableBitmaskEnumInNamespace() const
StringRef getCppNamespace() const
StringRef getFlangClauseBaseClass() const
std::vector< Record * > getAllowedOnceClauses() const
Directive(const llvm::Record *Def)
std::vector< Record * > getRequiredClauses() const
std::vector< Record * > getAllowedClauses() const
std::vector< Record * > getAllowedExclusiveClauses() const
std::vector< Record * > getAllDerivedDefinitions(StringRef ClassName) const
Get all the concrete records that inherit from the one specified class.
bool getValueAsBit(StringRef FieldName) const
This method looks up the specified field and returns its value as a bit, throwing an exception if the...
StringRef getName() const
std::vector< Record * > getValueAsListOfDefs(StringRef FieldName) const
This method looks up the specified field and returns its value as a vector of records,...
StringRef getValueAsString(StringRef FieldName) const
This method looks up the specified field and returns its value as a string, throwing an exception if ...
StringRef - Represent a constant reference to a string, i.e.
int64_t getMinVersion() const
int64_t getMaxVersion() const
VersionedClause(const llvm::Record *Def)
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
void erase_value(Container &C, ValueType V)
Wrapper function to remove a value from a container: