Use the target name instead of hard-coding SparcV9.

llvm-svn: 15616
This commit is contained in:
Misha Brukman 2004-08-10 18:31:01 +00:00
parent dc541abcd0
commit 59978333a3
1 changed files with 3 additions and 3 deletions

View File

@ -20,15 +20,15 @@
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 = "V9::";
std::string ClassName = "SparcV9CodeEmitter::";
std::string Namespace = Insts[0]->getValueAsString("Namespace") + "::";
//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"