diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-14 08:15:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-14 08:15:55 +0000 |
commit | 25b68c6770b7ba044ad37e0aed4f1c414f3b5209 (patch) | |
tree | 4937572a42e1cfa8710e6a48e1862f75967eb12b | |
parent | 2e9919a5e5fe76f4b1e3290103c4bfd149ebba9c (diff) |
change SrcLineInfo to contain a label instead of a label ID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98483 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 | ||||
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.h | 8 |
2 files changed, 7 insertions, 9 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 4b71cfe003..fd3902d850 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2220,13 +2220,12 @@ MCSymbol *DwarfDebug::recordSourceLine(unsigned Line, unsigned Col, MDNode *S) { assert(0 && "Unexpected scope info"); unsigned Src = GetOrCreateSourceID(Dir, Fn); - unsigned ID = MMI->NextLabelID(); - Lines.push_back(SrcLineInfo(Line, Col, Src, ID)); + MCSymbol *Label = getDWLabel("label", MMI->NextLabelID()); + Lines.push_back(SrcLineInfo(Line, Col, Src, Label)); if (TimePassesIsEnabled) DebugTimer->stopTimer(); - MCSymbol *Label = getDWLabel("label", ID); Asm->OutStreamer.EmitLabel(Label); return Label; } @@ -2614,8 +2613,7 @@ void DwarfDebug::emitDebugLines() { // Construct rows of the address, source, line, column matrix. for (unsigned i = 0, N = LineInfos.size(); i < N; ++i) { const SrcLineInfo &LineInfo = LineInfos[i]; - unsigned LabelID = LineInfo.getLabelID(); - MCSymbol *Label = getDWLabel("label", LabelID); + MCSymbol *Label = LineInfo.getLabel(); if (!Label->isDefined()) continue; // Not emitted, in dead code. if (LineInfo.getLine() == 0) continue; diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index c7c4fe3dd5..76c3f46c2e 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -45,16 +45,16 @@ class SrcLineInfo { unsigned Line; // Source line number. unsigned Column; // Source column. unsigned SourceID; // Source ID number. - unsigned LabelID; // Label in code ID number. + MCSymbol *Label; // Label in code ID number. public: - SrcLineInfo(unsigned L, unsigned C, unsigned S, unsigned I) - : Line(L), Column(C), SourceID(S), LabelID(I) {} + SrcLineInfo(unsigned L, unsigned C, unsigned S, MCSymbol *label) + : Line(L), Column(C), SourceID(S), Label(label) {} // Accessors unsigned getLine() const { return Line; } unsigned getColumn() const { return Column; } unsigned getSourceID() const { return SourceID; } - unsigned getLabelID() const { return LabelID; } + MCSymbol *getLabel() const { return Label; } }; class DwarfDebug : public DwarfPrinter { |