forked from OSchip/llvm-project
Deleted commented-out code as we now get namespace directly, add comments
llvm-svn: 15627
This commit is contained in:
parent
63be70d8f2
commit
422d0fadf1
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue