/// an operand, specified with syntax like ${opname:modifier}.
std::string MiModifier;
- // To make VS STL happy
- AsmWriterOperand():OperandType(isLiteralTextOperand) {}
+ // To make VS STL happy
+ AsmWriterOperand():OperandType(isLiteralTextOperand) {}
- AsmWriterOperand(const std::string &LitStr)
+ explicit AsmWriterOperand(const std::string &LitStr)
: OperandType(isLiteralTextOperand), Str(LitStr) {}
AsmWriterOperand(const std::string &Printer, unsigned OpNo,
}
O << "\";\n\n";
+ O << " if (TAI->doesSupportDebugInformation()) {\n"
+ << " const MachineFunction *MF = MI->getParent()->getParent();\n"
+ << " static DebugLoc PrevDL = DebugLoc::getUnknownLoc();\n"
+ << " DebugLoc CurDL = MI->getDebugLoc();\n\n"
+ << " if (!CurDL.isUnknown() && PrevDL != CurDL) {\n"
+ << " DebugLocTuple DLT = MF->getDebugLocTuple(CurDL);\n"
+ << " printLabel(DW->RecordSourceLine(DLT.Line, DLT.Col, DLT.Src));\n"
+ << " }\n\n"
+ << " PrevDL = CurDL;\n"
+ << " }\n\n";
+
O << " if (MI->getOpcode() == TargetInstrInfo::INLINEASM) {\n"
<< " O << \"\\t\";\n"
<< " printInlineAsm(MI);\n"