1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Ignore dummy register classes

llvm-svn: 7871
This commit is contained in:
Chris Lattner 2003-08-15 04:36:19 +00:00
parent 250f26f066
commit 894af9f898

View File

@ -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 = &"