forked from OSchip/llvm-project
[llvm-readobj] Fix incorrect printing of CV column info.
llvm-svn: 301720
This commit is contained in:
parent
05531ca19b
commit
4346ae1a05
|
@ -906,6 +906,7 @@ void COFFDumper::printCodeViewSymbolSection(StringRef SectionName,
|
|||
|
||||
ListScope S(W, "FilenameSegment");
|
||||
printFileNameForOffset("Filename", Entry.NameIndex);
|
||||
uint32_t ColumnIndex = 0;
|
||||
for (const auto &Line : Entry.LineNumbers) {
|
||||
if (Line.Offset >= LineInfo.header()->CodeSize) {
|
||||
error(object_error::parse_failed);
|
||||
|
@ -925,8 +926,9 @@ void COFFDumper::printCodeViewSymbolSection(StringRef SectionName,
|
|||
W.printNumber("LineNumberEndDelta", LI.getLineDelta());
|
||||
W.printBoolean("IsStatement", LI.isStatement());
|
||||
if (LineInfo.header()->Flags & HaveColumns) {
|
||||
W.printNumber("ColStart", Entry.Columns[0].StartColumn);
|
||||
W.printNumber("ColEnd", Entry.Columns[0].EndColumn);
|
||||
W.printNumber("ColStart", Entry.Columns[ColumnIndex].StartColumn);
|
||||
W.printNumber("ColEnd", Entry.Columns[ColumnIndex].EndColumn);
|
||||
++ColumnIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue