From c7df109b6c4f7cbf8cc4dbee90291d4e452c7d56 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 15 Aug 2003 04:36:19 +0000 Subject: Ignore dummy register classes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7871 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/RegisterInfoEmitter.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'utils/TableGen/RegisterInfoEmitter.cpp') 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 = &" -- cgit v1.1