This is an archive of the discontinued LLVM Phabricator instance.

Fix MSVC PointerUnion visualization
ClosedPublic

Authored by mspertus on Jan 1 2019, 9:20 AM.

Details

Summary

When PointerIntPair was updated to put the IntShift etc. in a helper type, it broke some MSVC visualizations, in particular PointerIntPair and PointerUnion. This patch fixes PointerUnion (PointerIntPair visualization has already been fixed) visualization by adding a local typedef to PointerIntPair so the PointerUnion visualizer can find the IntShift, etc.

While this could have been done in principle without adding the typedef, it not only seems generally useful for debugging, but writing the complex expressions needed without it seem to break the MSVC native visualizer, so this approach seems like a win-win.

As a bonus, we also slightly improve the SmallVector visualizer not to go crazy when visualized before its constructor is called

Diff Detail

Repository
rL LLVM

Event Timeline

mspertus created this revision.Jan 1 2019, 9:20 AM
mspertus updated this revision to Diff 179801.Jan 1 2019, 11:38 AM

Improve PointerUnion expansion to show what type it holds

aaron.ballman accepted this revision.Jan 2 2019, 6:56 AM

This looks great to me (aside from a minor commenting nit). Thank you for the fix!

include/llvm/ADT/PointerIntPair.h
45 ↗(On Diff #179801)

Add a full stop to the end of the comment.

This revision is now accepted and ready to land.Jan 2 2019, 6:56 AM
This revision was automatically updated to reflect the committed changes.