This is an archive of the discontinued LLVM Phabricator instance.

[NativePDB] Add tests for dumping global variables of class type
ClosedPublic

Authored by zturner on Oct 29 2018, 10:49 AM.

Details

Summary

Previous patches added support for dumpign global variables of builtin types, so this patch does the same for class types.

For the most part, everything just worked, there was only one minor bug fix needed, which was that when a variable is of a modified class type (const, volatile, etc), we can't resolve the forward decl in CreateAndCacheType, so when it comes time to call CompleteType, one of our asserts was firing because we expected a Class, Struct, Enum, or Union, but we were getting an LF_MODIFIER. The other issue was that one of my tests added an array member, and we hadn't yet handled them, so I just went ahead and handled them since it was easy.

There's probably room for lots of interesting test cases here, but these are the ones I was able to come up with.

Diff Detail

Repository
rL LLVM

Event Timeline

zturner created this revision.Oct 29 2018, 10:49 AM
aleksandr.urakov accepted this revision.Oct 30 2018, 3:52 AM

Looks awesome, thank you!

This revision is now accepted and ready to land.Oct 30 2018, 3:52 AM
This revision was automatically updated to reflect the committed changes.