This is an archive of the discontinued LLVM Phabricator instance.

Improve Visual Studio visualizations of llvm::PointerUnion by increasing type correctness
ClosedPublic

Authored by mspertus on Mar 10 2016, 7:45 PM.

Details

Summary

The Visual Studio native visualizer in llvm.natvis displays the actual pointer in a PointerUnion as a void *. E.g.

clang::Type const *: 0x02c4a880

Which doesn't make clear what the type looks like. With this change, we will display an actual Type *, resulting in a much better visualization that makes it clear that the clang::Type is a PointerType representing "Int *"

clang::Type const *: 0x02c4a880 PointerType: BuiltinType: Int *

(Note, the above uses an upcoming visualizer for clang::PointerType because that is my test case, but that is orthogonal to this change).

Diff Detail

Event Timeline

mspertus updated this revision to Diff 50391.Mar 10 2016, 7:45 PM
mspertus retitled this revision from to Improve Visual Studio visualizations of llvm::PointerUnion by increasing type correctness.
mspertus updated this object.
mspertus added reviewers: aaron.ballman, zturner.
mspertus added a subscriber: cfe-commits.
aaron.ballman edited edge metadata.Mar 11 2016, 6:17 AM

I think this change is good, but it likely needs to be replicated to PointerUnion3 and PointerUnion4, doesn't it?

Good catch. Give me two minutes....

mspertus updated this revision to Diff 50432.Mar 11 2016, 7:39 AM
mspertus edited edge metadata.

Applying same logic to PointerUnion3 and PointerUnion4 as suggested by Aaron

aaron.ballman accepted this revision.Mar 11 2016, 7:43 AM
aaron.ballman edited edge metadata.

LGTM, thank you!

This revision is now accepted and ready to land.Mar 11 2016, 7:43 AM
mspertus closed this revision.Mar 11 2016, 10:32 AM

Committed as svn revision 263270