X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=utils%2FTableGen%2FAsmWriterEmitter.cpp;h=6d2fa5578c9c7e99f40744ae7955d632e5e574ab;hb=249e1e4e2742977a4e3a5ba336b83168a4af43c0;hp=e2cd5dc031013edc3a7de5559e85f6cd00872606;hpb=7caa2d0ffcbb6faa37e280924d3653912cd52301;p=oota-llvm.git diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp index e2cd5dc0310..6d2fa5578c9 100644 --- a/utils/TableGen/AsmWriterEmitter.cpp +++ b/utils/TableGen/AsmWriterEmitter.cpp @@ -48,7 +48,7 @@ namespace llvm { // 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, @@ -640,6 +640,17 @@ void AsmWriterEmitter::run(std::ostream &O) { } 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"