mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-31 12:30:06 +00:00
Use the current target name instead of a ClassPrefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15585 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a964fe5b45
commit
d7a5b2826c
@ -14,21 +14,21 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "CodeEmitterGen.h"
|
#include "CodeEmitterGen.h"
|
||||||
|
#include "CodeGenTarget.h"
|
||||||
#include "Record.h"
|
#include "Record.h"
|
||||||
#include "Support/Debug.h"
|
#include "Support/Debug.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
void CodeEmitterGen::run(std::ostream &o) {
|
void CodeEmitterGen::run(std::ostream &o) {
|
||||||
|
CodeGenTarget Target;
|
||||||
std::vector<Record*> Insts = Records.getAllDerivedDefinitions("Instruction");
|
std::vector<Record*> Insts = Records.getAllDerivedDefinitions("Instruction");
|
||||||
|
|
||||||
EmitSourceFileHeader("Machine Code Emitter", o);
|
EmitSourceFileHeader("Machine Code Emitter", o);
|
||||||
|
|
||||||
std::string Namespace = Insts[0]->getValueAsString("Namespace") + "::";
|
std::string Namespace = Insts[0]->getValueAsString("Namespace") + "::";
|
||||||
std::string ClassName = Insts[0]->getValueAsString("ClassPrefix") +
|
|
||||||
"CodeEmitter::";
|
|
||||||
|
|
||||||
//const std::string &Namespace = Inst->getValue("Namespace")->getName();
|
//const std::string &Namespace = Inst->getValue("Namespace")->getName();
|
||||||
o << "unsigned " << ClassName
|
o << "unsigned " << Target.getName() << "CodeEmitter::"
|
||||||
<< "getBinaryCodeForInstr(MachineInstr &MI) {\n"
|
<< "getBinaryCodeForInstr(MachineInstr &MI) {\n"
|
||||||
<< " unsigned Value = 0;\n"
|
<< " unsigned Value = 0;\n"
|
||||||
<< " DEBUG(std::cerr << MI);\n"
|
<< " DEBUG(std::cerr << MI);\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user