llvm.org GIT mirror llvm / dd86e54
All backends use MC now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198959 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
2 changed file(s) with 1 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
972972
973973 // OperandSpacing - Space between operand columns.
974974 int OperandSpacing = -1;
975
976 // isMCAsmWriter - Is this assembly writer for an MC emitter? This controls
977 // generation of the printInstruction() method. For MC printers, it takes
978 // an MCInstr* operand, otherwise it takes a MachineInstr*.
979 bit isMCAsmWriter = 1;
980975 }
981976 def DefaultAsmWriter : AsmWriter;
982977
279279 void AsmWriterEmitter::EmitPrintInstruction(raw_ostream &O) {
280280 Record *AsmWriter = Target.getAsmWriter();
281281 std::string ClassName = AsmWriter->getValueAsString("AsmWriterClassName");
282 bool isMC = AsmWriter->getValueAsBit("isMCAsmWriter");
283 const char *MachineInstrClassName = isMC ? "MCInst" : "MachineInstr";
282 const char *MachineInstrClassName = "MCInst";
284283
285284 O <<
286285 "/// printInstruction - This method is automatically generated by tablegen\n"
763762 void AsmWriterEmitter::EmitPrintAliasInstruction(raw_ostream &O) {
764763 Record *AsmWriter = Target.getAsmWriter();
765764
766 if (!AsmWriter->getValueAsBit("isMCAsmWriter"))
767 return;
768
769765 O << "\n#ifdef PRINT_ALIAS_INSTR\n";
770766 O << "#undef PRINT_ALIAS_INSTR\n\n";
771767