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:
Dimitry Andric
2023-02-11 13:38:04 +01:00
parent 08e8dd7b9d
commit e3b5578096
6337 changed files with 395546 additions and 218630 deletions
+3 -3
View File
@@ -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();