Put code that generates debug labels into TableGen so that it can be used by

everyone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64978 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2009-02-18 23:12:06 +00:00
parent f570e621ab
commit cb819f13d7
9 changed files with 26 additions and 25 deletions
+11
View File
@@ -640,6 +640,17 @@ void AsmWriterEmitter::run(std::ostream &O) {
}
O << "\";\n\n";
O << " {\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";
O << " if (MI->getOpcode() == TargetInstrInfo::INLINEASM) {\n"
<< " O << \"\\t\";\n"
<< " printInlineAsm(MI);\n"