Make llvm-pdbdump print column info when available

llvm-pdbdump already had code to retrieve column information in the line tables, but it wasn't using it.

Most Microsoft PDBs don't seem to have column info, so this wasn't missed. But Clang includes column info by default (at least for now), and being able to see that is useful for ensuring we get the column info correct.

Differential Revision: https://reviews.llvm.org/D23629

llvm-svn: 279001
This commit is contained in:
Adrian McCarthy 2016-08-17 23:01:03 +00:00
parent 0149be7d58
commit 7a12429d29

View File

@ -76,6 +76,15 @@ void CompilandDumper::start(const PDBSymbolCompiland &Symbol,
if (LineStart != LineEnd)
WithColor(Printer, StatementColor).get() << " - " << LineEnd;
uint32_t ColumnStart = Line->getColumnNumber();
uint32_t ColumnEnd = Line->getColumnNumberEnd();
if (ColumnStart != 0 || ColumnEnd != 0) {
Printer << ", Column: ";
WithColor(Printer, StatementColor).get() << ColumnStart;
if (ColumnEnd != ColumnStart)
WithColor(Printer, StatementColor).get() << " - " << ColumnEnd;
}
Printer << ", Address: ";
if (Line->getLength() > 0) {
uint64_t AddrStart = Line->getVirtualAddress();