[llvm-commits] CVS: llvm/utils/TableGen/CodeEmitterGen.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Jul 31 23:16:02 PDT 2003
Changes in directory llvm/utils/TableGen:
CodeEmitterGen.cpp updated: 1.17 -> 1.18
---
Log message:
Minor cleanups
---
Diffs of the changes:
Index: llvm/utils/TableGen/CodeEmitterGen.cpp
diff -u llvm/utils/TableGen/CodeEmitterGen.cpp:1.17 llvm/utils/TableGen/CodeEmitterGen.cpp:1.18
--- llvm/utils/TableGen/CodeEmitterGen.cpp:1.17 Thu Jul 31 23:09:58 2003
+++ llvm/utils/TableGen/CodeEmitterGen.cpp Thu Jul 31 23:15:25 2003
@@ -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 @@
<< " 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";
More information about the llvm-commits
mailing list