Deleted commented-out code as we now get namespace directly, add comments

llvm-svn: 15627
This commit is contained in:
Misha Brukman 2004-08-10 20:54:58 +00:00
parent 63be70d8f2
commit 422d0fadf1
1 changed files with 3 additions and 2 deletions

View File

@ -24,15 +24,16 @@ void CodeEmitterGen::run(std::ostream &o) {
std::vector<Record*> Insts = Records.getAllDerivedDefinitions("Instruction");
EmitSourceFileHeader("Machine Code Emitter", o);
std::string Namespace = Insts[0]->getValueAsString("Namespace") + "::";
//const std::string &Namespace = Inst->getValue("Namespace")->getName();
// Emit function declaration
o << "unsigned " << Target.getName() << "CodeEmitter::"
<< "getBinaryCodeForInstr(MachineInstr &MI) {\n"
<< " unsigned Value = 0;\n"
<< " DEBUG(std::cerr << MI);\n"
<< " switch (MI.getOpcode()) {\n";
// Emit a case statement for each opcode
for (std::vector<Record*>::iterator I = Insts.begin(), E = Insts.end();
I != E; ++I) {
Record *R = *I;