diff options
| author | Bill Wendling <isanbard@gmail.com> | 2009-02-19 09:16:38 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2009-02-19 09:16:38 +0000 |
| commit | 82d8f120ec1300f4c5e8264f96b74676759d47f9 (patch) | |
| tree | 1e2fde191e156014f24c55f9b6fe6bfae49db5fb /llvm/utils/TableGen/AsmWriterEmitter.cpp | |
| parent | 8aafc89db869907cb5618a320d2d67d48e74f7fb (diff) | |
| download | bcm5719-llvm-82d8f120ec1300f4c5e8264f96b74676759d47f9.tar.gz bcm5719-llvm-82d8f120ec1300f4c5e8264f96b74676759d47f9.zip | |
Print out a new label only if the debug location *tuple* is different. The debug
locations may change, but the tuples may be the same.
llvm-svn: 65039
Diffstat (limited to 'llvm/utils/TableGen/AsmWriterEmitter.cpp')
| -rw-r--r-- | llvm/utils/TableGen/AsmWriterEmitter.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/llvm/utils/TableGen/AsmWriterEmitter.cpp b/llvm/utils/TableGen/AsmWriterEmitter.cpp index 6d2fa5578c9..4f810c1303c 100644 --- a/llvm/utils/TableGen/AsmWriterEmitter.cpp +++ b/llvm/utils/TableGen/AsmWriterEmitter.cpp @@ -642,13 +642,16 @@ void AsmWriterEmitter::run(std::ostream &O) { 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" + << " if (!CurDL.isUnknown()) {\n" + << " static DebugLocTuple PrevDLT(~0U, ~0U, ~0U);\n" + << " DebugLocTuple CurDLT = MF->getDebugLocTuple(CurDL);\n\n" + << " if (PrevDLT != CurDLT) {\n" + << " printLabel(DW->RecordSourceLine(CurDLT.Line, CurDLT.Col,\n" + << " CurDLT.Src));\n" + << " PrevDLT = CurDLT;\n" + << " }\n" + << " }\n" << " }\n\n"; O << " if (MI->getOpcode() == TargetInstrInfo::INLINEASM) {\n" |

