1#ifndef LLVM_TABLEGEN_DIRECTIVEEMITTER_H
2#define LLVM_TABLEGEN_DIRECTIVEEMITTER_H
20 const auto &DirectiveLanguages = getDirectiveLanguages();
21 Def = DirectiveLanguages[0];
76 std::vector<Record *> getDirectiveLanguages()
const {
77 return Records.getAllDerivedDefinitions(
"DirectiveLanguage");
97 std::string
N =
Name.str();
98 std::replace(
N.begin(),
N.end(),
' ',
'_');
165 std::string
N =
Name.str();
167 std::transform(
N.begin(),
N.end(),
N.begin(), [&Cap](
unsigned char C) {
169 C = llvm::toUpper(C);
171 }
else if (
C ==
'_') {
182 return Def->getValueAsString(
"enumClauseValue");
186 return Def->getValueAsListOfDefs(
"allowedClauseValues");
191 bool isValueList()
const {
return Def->getValueAsBit(
"isValueList"); }
194 return Def->getValueAsString(
"defaultValue");
197 bool isImplicit()
const {
return Def->getValueAsBit(
"isImplicit"); }
200 return Def->getValueAsListOfStrings(
"aliases");
206 return Def->getValueAsBit(
"isPrefixOptional");
231 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
std::vector< Record * > getAssociations() const
StringRef getClausePrefix() const
std::vector< Record * > getDirectives() const
StringRef getClauseEnumSetClass() const
std::vector< Record * > getCategories() 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
Record * getAssociation() const
std::vector< Record * > getAllowedOnceClauses() const
std::vector< Record * > getLeafConstructs() const
Directive(const llvm::Record *Def)
std::vector< Record * > getRequiredClauses() const
Record * getCategory() 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...
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
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(Container &C, ValueType V)
Wrapper function to remove a value from a container: