aboutsummaryrefslogtreecommitdiffstats
path: root/support/tools/TableGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-01 04:15:25 +0000
committerChris Lattner <sabre@nondot.org>2003-08-01 04:15:25 +0000
commitcf1b5853127352096ea6c2f8ec130f809168da2f (patch)
tree57d4d8365991f14f583bd9cdb9f4863964a8b593 /support/tools/TableGen
parentab47ae3381aa2372009a9054260461c20324b555 (diff)
downloadexternal_llvm-cf1b5853127352096ea6c2f8ec130f809168da2f.zip
external_llvm-cf1b5853127352096ea6c2f8ec130f809168da2f.tar.gz
external_llvm-cf1b5853127352096ea6c2f8ec130f809168da2f.tar.bz2
Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'support/tools/TableGen')
-rw-r--r--support/tools/TableGen/CodeEmitterGen.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/support/tools/TableGen/CodeEmitterGen.cpp b/support/tools/TableGen/CodeEmitterGen.cpp
index 75303c4..e24211e 100644
--- a/support/tools/TableGen/CodeEmitterGen.cpp
+++ b/support/tools/TableGen/CodeEmitterGen.cpp
@@ -10,10 +10,7 @@
bool CodeEmitterGen::run(std::ostream &o) {
std::vector<Record*> Insts;
-
- const std::map<std::string, Record*> &Defs = Records.getDefs();
-
- Records.getAllDerivedDefinitions("Instruction", Insts);
+ if (Records.getAllDerivedDefinitions("Instruction", Insts)) return true;
std::string Namespace = "V9::";
std::string ClassName = "SparcV9CodeEmitter::";
@@ -25,8 +22,7 @@ bool CodeEmitterGen::run(std::ostream &o) {
<< " DEBUG(std::cerr << MI);\n"
<< " switch (MI.getOpcode()) {\n";
for (std::vector<Record*>::iterator I = Insts.begin(), E = Insts.end();
- I != E; ++I)
- {
+ I != E; ++I) {
Record *R = *I;
o << " case " << Namespace << R->getName() << ": {\n"
<< " DEBUG(std::cerr << \"Emitting " << R->getName() << "\\n\");\n";