Constant propagate MachineInstrClassName.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198969 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Roman Divacky 2014-01-10 22:59:49 +00:00
parent 48324ba825
commit af43b47c5a

View File

@ -280,14 +280,12 @@ static void UnescapeString(std::string &Str) {
void AsmWriterEmitter::EmitPrintInstruction(raw_ostream &O) { void AsmWriterEmitter::EmitPrintInstruction(raw_ostream &O) {
Record *AsmWriter = Target.getAsmWriter(); Record *AsmWriter = Target.getAsmWriter();
std::string ClassName = AsmWriter->getValueAsString("AsmWriterClassName"); std::string ClassName = AsmWriter->getValueAsString("AsmWriterClassName");
const char *MachineInstrClassName = "MCInst";
O << O <<
"/// printInstruction - This method is automatically generated by tablegen\n" "/// printInstruction - This method is automatically generated by tablegen\n"
"/// from the instruction set description.\n" "/// from the instruction set description.\n"
"void " << Target.getName() << ClassName "void " << Target.getName() << ClassName
<< "::printInstruction(const " << MachineInstrClassName << "::printInstruction(const MCInst *MI, raw_ostream &O) {\n";
<< " *MI, raw_ostream &O) {\n";
// Build an aggregate string, and build a table of offsets into it. // Build an aggregate string, and build a table of offsets into it.
SequenceToOffsetTable<std::string> StringTable; SequenceToOffsetTable<std::string> StringTable;