Commit Graph

20 Commits

Author SHA1 Message Date
Machiel van Hooren 7063a83a7c Add MSVC natvis visualisation of llvm::Type
llvm::Type has some difficult to decode member variables with different meanings
depending on the TypeID. Specifically SubclassData and ContainedTys. This natvis
visualisation decodes and visualises those members.
2020-05-15 09:38:37 -04:00
Mike Spertus bb0b44deaa Clean up MSVC visualization of LLVM pointer types
Create separate natvis ptr and int views for PointerIntPair.
These are convenient in watch Windows and will be used by 
Clang visualizers to be checked in shortly

Also, removed deref views as the MSVC na format has
done the same thing natively since MSVC2013.

llvm-svn: 364723
2019-06-30 21:54:34 +00:00
Mike Spertus b359596d5a Visualizer for APInt and remove obsolete visualizer
Visualizer for the simple case of APInt (uints < 2^64)
as will be required  for Clang ConstantArrayType visualizer.
Also, removed obsolete VS2013 SmallVectorVisualizer as VS2013
is no longer supported.

llvm-svn: 362860
2019-06-08 00:23:08 +00:00
Mike Spertus 2d59bab568 Update MSVC Visualizer to reflect new variadic PointerUnion
This changed updates the MSVC Visualizer to work with the recent change
of PointerUnion into a variadic template. As an extra bonus, we
fix some bit rot in the SmallPtrSet visualizer as well

llvm-svn: 362345
2019-06-02 23:33:32 +00:00
Aaron Ballman 6c6fb80c2d Fix visualization of intrusive reference counted objects in MSVC.
llvm-svn: 350748
2019-01-09 18:59:56 +00:00
Mike Spertus 6fe3886f7e Enhance MSVC visualization of PointerUnions
Add a "deref" view that displays the pointed to objects since
other visualizers often need to display data reference by internal
PointerUnions

llvm-svn: 350469
2019-01-05 16:59:27 +00:00
Mike Spertus 252b7f3e4f Fix MSVC visualizer for PointerUnion4
Calculate which item is being held and then display it with the appropriate type. We also 
optimize the display of PointerUnion3 to take advantage of our knowing that the IntMask is
always 1 in PointerUnion types

llvm-svn: 350280
2019-01-03 00:52:54 +00:00
Mike Spertus e59da0ba06 MSVC Visualizer for PointerUnion3
llvm-svn: 350275
2019-01-02 23:46:59 +00:00
Mike Spertus 8cfefb5087 Fix MSVC PointerUnion visualizer
Differential Revision: https://reviews.llvm.org/D56186

llvm-svn: 350250
2019-01-02 19:26:50 +00:00
Zachary Turner cd3306c67b Fix Visual Studio PointerIntPair visualizer
Patch by: Trass3r

Differential Revision: https://reviews.llvm.org/D55252

llvm-svn: 349172
2018-12-14 18:20:21 +00:00
Daniil Fukalov 0d3b0f4f72 Fix typo in the MSVC Visualizer for SmallVector class
llvm-svn: 339029
2018-08-06 16:47:24 +00:00
Zachary Turner fea073f4e6 Add VS natvis support for LLVMDemangle's StringView.
llvm-svn: 338202
2018-07-28 17:25:42 +00:00
Zachary Turner 3d5a6dd6ed Fix the MSVC Visualizers for SmallVector classes.
Recent changes to the internal structure of SmallVector<> broke
all of the MSVC visualizers.  This fixes them.

llvm-svn: 337644
2018-07-21 15:38:47 +00:00
Zachary Turner 148e86fdd0 2 VS natvis improvements.
Optional<T> was broken due to a change in the class's internals.
That is fixed, and additionally a visualizer is added for
Expected<T>.

llvm-svn: 335892
2018-06-28 17:55:54 +00:00
Antonio Maiorano d9af48a931 Improve natvis for llvm::SmallString so that it correctly displays only the valid portion of the string
The usual method, and the one employed before my change, of displaying strings in natvis is to make use of the "<variable>,s" format specifier; however, this method only works for null-terminated strings. My fix here is to use the "<pointer>,[size]" format specifier to display a bounded array, and then cast it to "const char*", which in the MSVC debugger has the desired effect of rendering the character array as a string.

Differential Revision: https://reviews.llvm.org/D27972

llvm-svn: 290224
2016-12-21 01:05:29 +00:00
Mike Spertus 292e511a93 Improved Visual Studio 2015 visualization of SmallVectorImpl
When visualizing small vectors in VS2015, show the first few elements in the DisplayString instead of the size. For example, a SmallVector of DeclAccessPair will visualize like

  {public typename ...Ts, public typename U}

The visualization in VS2013 remains the same because we continue to include the old visualizer with a lower-than-default priority of MediumLow, and the same SmallVector would continue to be visualized as

  {size = 2}

llvm-svn: 272525
2016-06-13 01:43:14 +00:00
Mike Spertus 3e45d77835 Add Visual Studio Visualizer for ArrayRef
Modeled after visualization of llvm::SmallVec

llvm-svn: 271847
2016-06-05 18:34:02 +00:00
Zachary Turner ba2d1c0250 Add natvis visualizers for endian types.
This allows ulittle* and ubig* types to be visualized properly
in VS.

Differential Revision: http://reviews.llvm.org/D19339
Reviewed By: Aaron Ballman

llvm-svn: 267050
2016-04-21 20:58:41 +00:00
Mike Spertus b45688eca4 Submitted new file with wrong line endings. Correcting...
llvm-svn: 264620
2016-03-28 19:06:17 +00:00
Mike Spertus 0b96a2e842 Use VS2015 Project Support for Natvis to eliminate the need to manually install natvis files
When using Visual Studio 2015, cmake now puts the native visualizers in llvm.sln, so the developer automatically sees custom visualizations.
Much thanks to ariccio who provided extensive help on this change. (manual installation still needed on VS2013)

llvm-svn: 264601
2016-03-28 17:58:38 +00:00