From accd8abeebfa73e0a4cb2d4372ecf42513561460 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 1 Aug 2003 04:47:20 +0000 Subject: [PATCH] Dead code elimination git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7468 91177308-0d34-0410-b5e6-96231b3b80d8 --- support/tools/TableGen/TableGen.cpp | 13 +++---------- utils/TableGen/TableGen.cpp | 13 +++---------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/support/tools/TableGen/TableGen.cpp b/support/tools/TableGen/TableGen.cpp index 90169e89431..218797ba284 100644 --- a/support/tools/TableGen/TableGen.cpp +++ b/support/tools/TableGen/TableGen.cpp @@ -402,6 +402,9 @@ int main(int argc, char **argv) { try { switch (Action) { + case PrintRecords: + *Out << Records; // No argument, dump all contents + break; case Parse: ParseMachineCode(); break; @@ -414,18 +417,8 @@ int main(int argc, char **argv) { case GenRegisterHeader: RegisterInfoEmitter(Records).runHeader(*Out); break; - case PrintRecords: - *Out << Records; // No argument, dump all contents - break; case PrintEnums: - Record *R = Records.getClass(Class); - if (R == 0) { - std::cerr << "Cannot find class '" << Class << "'!\n"; - abort(); - } - std::vector Recs = Records.getAllDerivedDefinitions(Class); - for (unsigned i = 0, e = Recs.size(); i != e; ++i) *Out << Recs[i] << ", "; *Out << "\n"; diff --git a/utils/TableGen/TableGen.cpp b/utils/TableGen/TableGen.cpp index 90169e89431..218797ba284 100644 --- a/utils/TableGen/TableGen.cpp +++ b/utils/TableGen/TableGen.cpp @@ -402,6 +402,9 @@ int main(int argc, char **argv) { try { switch (Action) { + case PrintRecords: + *Out << Records; // No argument, dump all contents + break; case Parse: ParseMachineCode(); break; @@ -414,18 +417,8 @@ int main(int argc, char **argv) { case GenRegisterHeader: RegisterInfoEmitter(Records).runHeader(*Out); break; - case PrintRecords: - *Out << Records; // No argument, dump all contents - break; case PrintEnums: - Record *R = Records.getClass(Class); - if (R == 0) { - std::cerr << "Cannot find class '" << Class << "'!\n"; - abort(); - } - std::vector Recs = Records.getAllDerivedDefinitions(Class); - for (unsigned i = 0, e = Recs.size(); i != e; ++i) *Out << Recs[i] << ", "; *Out << "\n";