This is an archive of the discontinued LLVM Phabricator instance.

Improves pretty printing of variable types in llvm-pdbdump
ClosedPublic

Authored by amccarth on Apr 7 2017, 3:49 PM.

Details

Summary
  • Adds support for pointers to arrays, which was missing
  • Adds some tests
  • Makes one test more robust in the face of unpredictable ordering in the generated PDB
  • Improves consistency of const and volatile qualifiers
  • Eliminates non-composable special case code for arrays and function by using a more general recursive approach
  • Has a hack for getting the calling convention into the right spot for pointer-to-functions

Given the rapid changes happenning in llvm-pdbdump, this may be difficult to merge.

Diff Detail

Repository
rL LLVM

Event Timeline

amccarth created this revision.Apr 7 2017, 3:49 PM
zturner accepted this revision.Apr 10 2017, 9:05 AM

lgtm, only some minor nits.

llvm/tools/llvm-pdbdump/PrettyVariableDumper.cpp
154 ↗(On Diff #94572)

You'll probably need to do a merge here, as I changed the syntax for this line.

159 ↗(On Diff #94572)

here I'd suggest just using isa<PDBSymbolTypeArray> since we don't actually need the derived class.

170–172 ↗(On Diff #94572)

I wonder if it's worth asserting here. You can still return if it's null, but it seems like a bad PDB file at the same time.

173–174 ↗(On Diff #94572)

isa<> again.

This revision is now accepted and ready to land.Apr 10 2017, 9:05 AM
amccarth marked 4 inline comments as done.Apr 10 2017, 9:48 AM

Thanks for the review, especially for the heads up on the merge points.

llvm/tools/llvm-pdbdump/PrettyVariableDumper.cpp
170–172 ↗(On Diff #94572)

Agreed. I was following a pattern I saw in other parts of the code, but the assert makes sense. I've also added the for ElementType in the array cases.

This revision was automatically updated to reflect the committed changes.
amccarth marked an inline comment as done.