diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-02-18 23:12:06 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-02-18 23:12:06 +0000 |
commit | 4ff1cdf7167eb0d20bb3df49f98b19182f2baf8a (patch) | |
tree | af68a0d5c11879dd67109fee2b4248e86caeb666 /utils | |
parent | 3aa011fa944c3705b30c392780207b064515dc58 (diff) | |
download | external_llvm-4ff1cdf7167eb0d20bb3df49f98b19182f2baf8a.zip external_llvm-4ff1cdf7167eb0d20bb3df49f98b19182f2baf8a.tar.gz external_llvm-4ff1cdf7167eb0d20bb3df49f98b19182f2baf8a.tar.bz2 |
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
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/AsmWriterEmitter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp index 93d67e8..3b66b94 100644 --- a/utils/TableGen/AsmWriterEmitter.cpp +++ b/utils/TableGen/AsmWriterEmitter.cpp @@ -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" |