[llvm-commits] CVS: llvm/utils/TableGen/CodeEmitterGen.cpp
Misha Brukman
brukman at cs.uiuc.edu
Mon Aug 9 12:10:53 PDT 2004
Changes in directory llvm/utils/TableGen:
CodeEmitterGen.cpp updated: 1.32 -> 1.33
---
Log message:
Use the current target name instead of a ClassPrefix.
---
Diffs of the changes: (+3 -3)
Index: llvm/utils/TableGen/CodeEmitterGen.cpp
diff -u llvm/utils/TableGen/CodeEmitterGen.cpp:1.32 llvm/utils/TableGen/CodeEmitterGen.cpp:1.33
--- llvm/utils/TableGen/CodeEmitterGen.cpp:1.32 Mon Aug 9 12:47:45 2004
+++ llvm/utils/TableGen/CodeEmitterGen.cpp Mon Aug 9 14:10:43 2004
@@ -14,21 +14,21 @@
//===----------------------------------------------------------------------===//
#include "CodeEmitterGen.h"
+#include "CodeGenTarget.h"
#include "Record.h"
#include "Support/Debug.h"
using namespace llvm;
void CodeEmitterGen::run(std::ostream &o) {
+ CodeGenTarget Target;
std::vector<Record*> Insts = Records.getAllDerivedDefinitions("Instruction");
EmitSourceFileHeader("Machine Code Emitter", o);
std::string Namespace = Insts[0]->getValueAsString("Namespace") + "::";
- std::string ClassName = Insts[0]->getValueAsString("ClassPrefix") +
- "CodeEmitter::";
//const std::string &Namespace = Inst->getValue("Namespace")->getName();
- o << "unsigned " << ClassName
+ o << "unsigned " << Target.getName() << "CodeEmitter::"
<< "getBinaryCodeForInstr(MachineInstr &MI) {\n"
<< " unsigned Value = 0;\n"
<< " DEBUG(std::cerr << MI);\n"
More information about the llvm-commits
mailing list