14#ifndef LLVM_TABLEGEN_DIRECTIVEEMITTER_H
15#define LLVM_TABLEGEN_DIRECTIVEEMITTER_H
32 const auto &DirectiveLanguages = getDirectiveLanguages();
33 Def = DirectiveLanguages[0];
89 return Records.getAllDerivedDefinitions(
"DirectiveLanguage");
118 std::string
N =
Name.str();
119 std::replace(
N.begin(),
N.end(),
' ',
'_');
188 std::string
N =
Name.str();
190 std::transform(
N.begin(),
N.end(),
N.begin(), [&Cap](
unsigned char C) {
194 }
else if (
C ==
'_') {
205 return Def->getValueAsString(
"enumClauseValue");
209 return Def->getValueAsListOfDefs(
"allowedClauseValues");
214 bool isValueList()
const {
return Def->getValueAsBit(
"isValueList"); }
217 return Def->getValueAsString(
"defaultValue");
220 bool isImplicit()
const {
return Def->getValueAsBit(
"isImplicit"); }
223 return Def->getValueAsListOfStrings(
"aliases");
229 return Def->getValueAsBit(
"isPrefixOptional");
254 int getValue()
const {
return Def->getValueAsInt(
"value"); }
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
StringRef getRecordName() const
StringRef getName() const
StringRef getAlternativeName() const
std::string getFormattedName() const
BaseRecord(const Record *Def)
bool isUserVisible() const
ClauseVal(const Record *Def)
StringRef getClangClass() const
std::vector< const Record * > getClauseVals() const
Clause(const Record *Def)
StringRef getDefaultValue() const
bool isValueOptional() const
StringRef getFlangClass() const
std::vector< StringRef > getAliases() const
StringRef getEnumName() const
bool isPrefixOptional() const
std::string getFormattedParserClassName() const
StringRef getPrefix() const
bool hasMakeEnumAvailableInNamespace() const
bool HasValidityErrors() const
StringRef getClausePrefix() const
StringRef getClauseEnumSetClass() const
DirectiveLanguage(const RecordKeeper &Records)
ArrayRef< const Record * > getAssociations() const
ArrayRef< const Record * > getDirectives() const
ArrayRef< const Record * > getClauses() const
StringRef getName() const
ArrayRef< const Record * > getCategories() const
StringRef getDirectivePrefix() const
bool hasEnableBitmaskEnumInNamespace() const
StringRef getCppNamespace() const
StringRef getFlangClauseBaseClass() const
const Record * getAssociation() const
std::vector< const Record * > getLeafConstructs() const
const Record * getCategory() const
std::vector< const Record * > getAllowedClauses() const
Directive(const Record *Def)
std::vector< const Record * > getAllowedOnceClauses() const
std::vector< const Record * > getRequiredClauses() const
std::vector< const Record * > getAllowedExclusiveClauses() const
ArrayRef< const 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...
std::vector< const Record * > getValueAsListOfDefs(StringRef FieldName) const
This method looks up the specified field and returns its value as a vector of records,...
const Record * getValueAsDef(StringRef FieldName) const
This method looks up the specified field and returns its value as a Record, throwing an exception if ...
StringRef getName() const
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 Record *Def)
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
void erase(Container &C, ValueType V)
Wrapper function to remove a value from a container: