This is an archive of the discontinued LLVM Phabricator instance.

[llvm-pdbdump] Add guard for null pointers and remove unused code
ClosedPublic

Authored by asmith on Mar 5 2018, 1:19 PM.

Diff Detail

Event Timeline

asmith created this revision.Mar 5 2018, 1:19 PM
asmith added a reviewer: rnk.Mar 6 2018, 10:34 AM
zturner accepted this revision.Mar 6 2018, 12:28 PM

I don't have any problems with this, so feel free to commit. But I'm curious how you ran into this. Did you find a PDB with no compilands, functions, or data? If so, I'm curious how it was generated.

This revision is now accepted and ready to land.Mar 6 2018, 12:28 PM
asmith added a comment.Mar 6 2018, 6:20 PM

Yes, at least some of these changes are necessary to stop llvm-pdbdump from crashing today.

Here is a reproducer (atleast for us):

llvm-pdbdump.exe pretty -all -native foo.pdb

This revision was automatically updated to reflect the committed changes.