Skip to content

Commit

Permalink
Constant propagate MachineInstrClassName.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198969 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
rdivacky committed Jan 10, 2014
1 parent 48324ba commit af43b47
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions utils/TableGen/AsmWriterEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,12 @@ static void UnescapeString(std::string &Str) {
void AsmWriterEmitter::EmitPrintInstruction(raw_ostream &O) {
Record *AsmWriter = Target.getAsmWriter();
std::string ClassName = AsmWriter->getValueAsString("AsmWriterClassName");
const char *MachineInstrClassName = "MCInst";

O <<
"/// printInstruction - This method is automatically generated by tablegen\n"
"/// from the instruction set description.\n"
"void " << Target.getName() << ClassName
<< "::printInstruction(const " << MachineInstrClassName
<< " *MI, raw_ostream &O) {\n";
<< "::printInstruction(const MCInst *MI, raw_ostream &O) {\n";

// Build an aggregate string, and build a table of offsets into it.
SequenceToOffsetTable<std::string> StringTable;
Expand Down

0 comments on commit af43b47

Please sign in to comment.