[DWARF] Make DWARFDebugLine::ParsingState::RowNumber a local variable

llvm-svn: 358374
This commit is contained in:
Fangrui Song 2019-04-15 07:40:30 +00:00
parent 43e92880ac
commit 50a09670f0
2 changed files with 2 additions and 5 deletions

View File

@ -355,9 +355,6 @@ private:
/// Line table we're currently parsing.
struct LineTable *LineTable;
/// The row number that starts at zero for the prologue, and increases for
/// each row added to the matrix.
unsigned RowNumber = 0;
struct Row Row;
struct Sequence Sequence;
};

View File

@ -426,18 +426,18 @@ void DWARFDebugLine::ParsingState::resetRowAndSequence() {
}
void DWARFDebugLine::ParsingState::appendRowToMatrix() {
unsigned RowNumber = LineTable->Rows.size();
if (Sequence.Empty) {
// Record the beginning of instruction sequence.
Sequence.Empty = false;
Sequence.LowPC = Row.Address.Address;
Sequence.FirstRowIndex = RowNumber;
}
++RowNumber;
LineTable->appendRow(Row);
if (Row.EndSequence) {
// Record the end of instruction sequence.
Sequence.HighPC = Row.Address.Address;
Sequence.LastRowIndex = RowNumber;
Sequence.LastRowIndex = RowNumber + 1;
Sequence.SectionIndex = Row.Address.SectionIndex;
if (Sequence.isValid())
LineTable->appendSequence(Sequence);