mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Use the variable names from the TargetInstrInfo source when we
reference them in the generated files. A few characters aren't huge here and CFSetupOpcode is much more readable than S0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232132 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4223496f24
commit
c666f5df88
@ -430,7 +430,8 @@ void InstrInfoEmitter::run(raw_ostream &OS) {
|
|||||||
std::string ClassName = TargetName + "GenInstrInfo";
|
std::string ClassName = TargetName + "GenInstrInfo";
|
||||||
OS << "namespace llvm {\n";
|
OS << "namespace llvm {\n";
|
||||||
OS << "struct " << ClassName << " : public TargetInstrInfo {\n"
|
OS << "struct " << ClassName << " : public TargetInstrInfo {\n"
|
||||||
<< " explicit " << ClassName << "(int SO = -1, int DO = -1);\n"
|
<< " explicit " << ClassName
|
||||||
|
<< "(int CFSetupOpcode = -1, int CFDestroyOpcode = -1);\n"
|
||||||
<< " virtual ~" << ClassName << "();\n"
|
<< " virtual ~" << ClassName << "();\n"
|
||||||
<< "};\n";
|
<< "};\n";
|
||||||
OS << "} // End llvm namespace \n";
|
OS << "} // End llvm namespace \n";
|
||||||
@ -444,10 +445,11 @@ void InstrInfoEmitter::run(raw_ostream &OS) {
|
|||||||
OS << "extern const MCInstrDesc " << TargetName << "Insts[];\n";
|
OS << "extern const MCInstrDesc " << TargetName << "Insts[];\n";
|
||||||
OS << "extern const unsigned " << TargetName << "InstrNameIndices[];\n";
|
OS << "extern const unsigned " << TargetName << "InstrNameIndices[];\n";
|
||||||
OS << "extern const char " << TargetName << "InstrNameData[];\n";
|
OS << "extern const char " << TargetName << "InstrNameData[];\n";
|
||||||
OS << ClassName << "::" << ClassName << "(int SO, int DO)\n"
|
OS << ClassName << "::" << ClassName
|
||||||
<< " : TargetInstrInfo(SO, DO) {\n"
|
<< "(int CFSetupOpcode, int CFDestroyOpcode)\n"
|
||||||
<< " InitMCInstrInfo(" << TargetName << "Insts, "
|
<< " : TargetInstrInfo(CFSetupOpcode, CFDestroyOpcode) {\n"
|
||||||
<< TargetName << "InstrNameIndices, " << TargetName << "InstrNameData, "
|
<< " InitMCInstrInfo(" << TargetName << "Insts, " << TargetName
|
||||||
|
<< "InstrNameIndices, " << TargetName << "InstrNameData, "
|
||||||
<< NumberedInstructions.size() << ");\n}\n"
|
<< NumberedInstructions.size() << ");\n}\n"
|
||||||
<< ClassName << "::~" << ClassName << "() {}\n";
|
<< ClassName << "::~" << ClassName << "() {}\n";
|
||||||
OS << "} // End llvm namespace \n";
|
OS << "} // End llvm namespace \n";
|
||||||
|
Loading…
Reference in New Issue
Block a user