diff options
-rw-r--r-- | support/tools/TableGen/RegisterInfoEmitter.cpp | 10 | ||||
-rw-r--r-- | utils/TableGen/RegisterInfoEmitter.cpp | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/support/tools/TableGen/RegisterInfoEmitter.cpp b/support/tools/TableGen/RegisterInfoEmitter.cpp index 9ef5f02..af3efe3 100644 --- a/support/tools/TableGen/RegisterInfoEmitter.cpp +++ b/support/tools/TableGen/RegisterInfoEmitter.cpp @@ -53,8 +53,11 @@ void RegisterInfoEmitter::runHeader(std::ostream &OS) { OS << "namespace " << TargetName << " { // Register classes\n"; for (unsigned i = 0, e = RegisterClasses.size(); i != e; ++i) { + if (RegisterClasses[i]->getValueAsBit("isDummyClass")) + continue; // Ignore dummies + const std::string &Name = RegisterClasses[i]->getName(); - if (Name.size() < 9 || Name[9] != '.') // Ignore anonymous classes + if (Name.size() < 9 || Name[9] != '.') // Ignore anonymous classes OS << " extern TargetRegisterClass *" << Name << "RegisterClass;\n"; } OS << "} // end of namespace " << TargetName << "\n\n"; @@ -82,6 +85,8 @@ void RegisterInfoEmitter::run(std::ostream &OS) { for (unsigned rc = 0, e = RegisterClasses.size(); rc != e; ++rc) { Record *RC = RegisterClasses[rc]; + if (RC->getValueAsBit("isDummyClass")) continue; // Ignore dummies + std::string Name = RC->getName(); if (Name.size() > 9 && Name[9] == '.') { static unsigned AnonCounter = 0; @@ -197,6 +202,9 @@ void RegisterInfoEmitter::run(std::ostream &OS) { OS << "namespace " << Target.getName() << " { // Register classes\n"; for (unsigned i = 0, e = RegisterClasses.size(); i != e; ++i) { + if (RegisterClasses[i]->getValueAsBit("isDummyClass")) + continue; // Ignore dummies + const std::string &Name = RegisterClasses[i]->getName(); if (Name.size() < 9 || Name[9] != '.') // Ignore anonymous classes OS << " TargetRegisterClass *" << Name << "RegisterClass = &" diff --git a/utils/TableGen/RegisterInfoEmitter.cpp b/utils/TableGen/RegisterInfoEmitter.cpp index 9ef5f02..af3efe3 100644 --- a/utils/TableGen/RegisterInfoEmitter.cpp +++ b/utils/TableGen/RegisterInfoEmitter.cpp @@ -53,8 +53,11 @@ void RegisterInfoEmitter::runHeader(std::ostream &OS) { OS << "namespace " << TargetName << " { // Register classes\n"; for (unsigned i = 0, e = RegisterClasses.size(); i != e; ++i) { + if (RegisterClasses[i]->getValueAsBit("isDummyClass")) + continue; // Ignore dummies + const std::string &Name = RegisterClasses[i]->getName(); - if (Name.size() < 9 || Name[9] != '.') // Ignore anonymous classes + if (Name.size() < 9 || Name[9] != '.') // Ignore anonymous classes OS << " extern TargetRegisterClass *" << Name << "RegisterClass;\n"; } OS << "} // end of namespace " << TargetName << "\n\n"; @@ -82,6 +85,8 @@ void RegisterInfoEmitter::run(std::ostream &OS) { for (unsigned rc = 0, e = RegisterClasses.size(); rc != e; ++rc) { Record *RC = RegisterClasses[rc]; + if (RC->getValueAsBit("isDummyClass")) continue; // Ignore dummies + std::string Name = RC->getName(); if (Name.size() > 9 && Name[9] == '.') { static unsigned AnonCounter = 0; @@ -197,6 +202,9 @@ void RegisterInfoEmitter::run(std::ostream &OS) { OS << "namespace " << Target.getName() << " { // Register classes\n"; for (unsigned i = 0, e = RegisterClasses.size(); i != e; ++i) { + if (RegisterClasses[i]->getValueAsBit("isDummyClass")) + continue; // Ignore dummies + const std::string &Name = RegisterClasses[i]->getName(); if (Name.size() < 9 || Name[9] != '.') // Ignore anonymous classes OS << " TargetRegisterClass *" << Name << "RegisterClass = &" |