Vendor import of llvm-project main llvmorg-16-init-18548-gb0daacf58f41,
the last commit before the upstream release/17.x branch was created.
This commit is contained in:
@@ -43,7 +43,7 @@ void Attributes::emitTargetIndependentNames(raw_ostream &OS) {
|
||||
<< "(FIRST, SECOND) ATTRIBUTE_ALL(FIRST, SECOND)\n";
|
||||
OS << "#endif\n\n";
|
||||
for (StringRef KindName : KindNames) {
|
||||
for (auto A : Records.getAllDerivedDefinitions(KindName)) {
|
||||
for (auto *A : Records.getAllDerivedDefinitions(KindName)) {
|
||||
OS << MacroName << "(" << A->getName() << ","
|
||||
<< A->getValueAsString("AttrString") << ")\n";
|
||||
}
|
||||
@@ -63,7 +63,7 @@ void Attributes::emitTargetIndependentNames(raw_ostream &OS) {
|
||||
unsigned Value = 1; // Leave zero for AttrKind::None.
|
||||
for (StringRef KindName : {"EnumAttr", "TypeAttr", "IntAttr"}) {
|
||||
OS << "First" << KindName << " = " << Value << ",\n";
|
||||
for (auto A : Records.getAllDerivedDefinitions(KindName)) {
|
||||
for (auto *A : Records.getAllDerivedDefinitions(KindName)) {
|
||||
OS << A->getName() << " = " << Value << ",\n";
|
||||
Value++;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ void Attributes::emitAttributeProperties(raw_ostream &OS) {
|
||||
OS << "#undef GET_ATTR_PROP_TABLE\n";
|
||||
OS << "static const uint8_t AttrPropTable[] = {\n";
|
||||
for (StringRef KindName : {"EnumAttr", "TypeAttr", "IntAttr"}) {
|
||||
for (auto A : Records.getAllDerivedDefinitions(KindName)) {
|
||||
for (auto *A : Records.getAllDerivedDefinitions(KindName)) {
|
||||
OS << "0";
|
||||
for (Init *P : *A->getValueAsListInit("Properties"))
|
||||
OS << " | AttributeProperty::" << cast<DefInit>(P)->getDef()->getName();
|
||||
|
||||
Reference in New Issue
Block a user