[llvm] r279001 - Make llvm-pdbdump print column info when available
Adrian McCarthy via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 17 16:01:03 PDT 2016
Author: amccarth
Date: Wed Aug 17 18:01:03 2016
New Revision: 279001
URL: http://llvm.org/viewvc/llvm-project?rev=279001&view=rev
Log:
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
Modified:
llvm/trunk/tools/llvm-pdbdump/CompilandDumper.cpp
Modified: llvm/trunk/tools/llvm-pdbdump/CompilandDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/CompilandDumper.cpp?rev=279001&r1=279000&r2=279001&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/CompilandDumper.cpp (original)
+++ llvm/trunk/tools/llvm-pdbdump/CompilandDumper.cpp Wed Aug 17 18:01:03 2016
@@ -76,6 +76,15 @@ void CompilandDumper::start(const PDBSym
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();
More information about the llvm-commits
mailing list