mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-12 15:30:56 +00:00
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
This commit is contained in:
parent
2e9919a5e5
commit
25b68c6770
@ -2220,13 +2220,12 @@ MCSymbol *DwarfDebug::recordSourceLine(unsigned Line, unsigned Col, MDNode *S) {
|
|||||||
assert(0 && "Unexpected scope info");
|
assert(0 && "Unexpected scope info");
|
||||||
|
|
||||||
unsigned Src = GetOrCreateSourceID(Dir, Fn);
|
unsigned Src = GetOrCreateSourceID(Dir, Fn);
|
||||||
unsigned ID = MMI->NextLabelID();
|
MCSymbol *Label = getDWLabel("label", MMI->NextLabelID());
|
||||||
Lines.push_back(SrcLineInfo(Line, Col, Src, ID));
|
Lines.push_back(SrcLineInfo(Line, Col, Src, Label));
|
||||||
|
|
||||||
if (TimePassesIsEnabled)
|
if (TimePassesIsEnabled)
|
||||||
DebugTimer->stopTimer();
|
DebugTimer->stopTimer();
|
||||||
|
|
||||||
MCSymbol *Label = getDWLabel("label", ID);
|
|
||||||
Asm->OutStreamer.EmitLabel(Label);
|
Asm->OutStreamer.EmitLabel(Label);
|
||||||
return Label;
|
return Label;
|
||||||
}
|
}
|
||||||
@ -2614,8 +2613,7 @@ void DwarfDebug::emitDebugLines() {
|
|||||||
// Construct rows of the address, source, line, column matrix.
|
// Construct rows of the address, source, line, column matrix.
|
||||||
for (unsigned i = 0, N = LineInfos.size(); i < N; ++i) {
|
for (unsigned i = 0, N = LineInfos.size(); i < N; ++i) {
|
||||||
const SrcLineInfo &LineInfo = LineInfos[i];
|
const SrcLineInfo &LineInfo = LineInfos[i];
|
||||||
unsigned LabelID = LineInfo.getLabelID();
|
MCSymbol *Label = LineInfo.getLabel();
|
||||||
MCSymbol *Label = getDWLabel("label", LabelID);
|
|
||||||
if (!Label->isDefined()) continue; // Not emitted, in dead code.
|
if (!Label->isDefined()) continue; // Not emitted, in dead code.
|
||||||
|
|
||||||
if (LineInfo.getLine() == 0) continue;
|
if (LineInfo.getLine() == 0) continue;
|
||||||
|
@ -45,16 +45,16 @@ class SrcLineInfo {
|
|||||||
unsigned Line; // Source line number.
|
unsigned Line; // Source line number.
|
||||||
unsigned Column; // Source column.
|
unsigned Column; // Source column.
|
||||||
unsigned SourceID; // Source ID number.
|
unsigned SourceID; // Source ID number.
|
||||||
unsigned LabelID; // Label in code ID number.
|
MCSymbol *Label; // Label in code ID number.
|
||||||
public:
|
public:
|
||||||
SrcLineInfo(unsigned L, unsigned C, unsigned S, unsigned I)
|
SrcLineInfo(unsigned L, unsigned C, unsigned S, MCSymbol *label)
|
||||||
: Line(L), Column(C), SourceID(S), LabelID(I) {}
|
: Line(L), Column(C), SourceID(S), Label(label) {}
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
unsigned getLine() const { return Line; }
|
unsigned getLine() const { return Line; }
|
||||||
unsigned getColumn() const { return Column; }
|
unsigned getColumn() const { return Column; }
|
||||||
unsigned getSourceID() const { return SourceID; }
|
unsigned getSourceID() const { return SourceID; }
|
||||||
unsigned getLabelID() const { return LabelID; }
|
MCSymbol *getLabel() const { return Label; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class DwarfDebug : public DwarfPrinter {
|
class DwarfDebug : public DwarfPrinter {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user