Skip to content

Commit

Permalink
Visualizer for APInt and remove obsolete visualizer
Browse files Browse the repository at this point in the history
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362860 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
mspertus committed Jun 8, 2019
1 parent 27a3c6c commit f84ae54
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions utils/LLVMVisualizers/llvm.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,6 @@ For Visual Studio 2013 only, put this file into
For later versions of Visual Studio, no setup is required.
-->
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<!-- VS2013 -->
<Type Name="llvm::SmallVectorImpl&lt;*&gt;" Priority="MediumLow">
<DisplayString Condition="Size == 0">empty</DisplayString>
<DisplayString Condition="Size != 0">{{ size={Size} }}</DisplayString>
<Expand>
<Item Name="[size]">Size</Item>
<Item Name="[capacity]">Capacity</Item>
<ArrayItems>
<Size>Size</Size>
<ValuePointer>($T1*)BeginX</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<!-- VS2015 and up -->
<Type Name="llvm::SmallVectorImpl&lt;*&gt;">
<DisplayString IncludeView ="elt0" Condition="Size == 0"></DisplayString>
<DisplayString IncludeView ="elt0">{(($T1*)BeginX)[0]}{*this,view(elt1)}</DisplayString>
Expand All @@ -45,6 +31,11 @@ For later versions of Visual Studio, no setup is required.
</ArrayItems>
</Expand>
</Type>
<Type Name="llvm::APInt">
<!-- For now, only handle up to 64-bit unsigned ints -->
<DisplayString Condition="BitWidth &lt;= 64">{U.VAL}</DisplayString>
<DisplayString>Cannot visualize APInts longer than 64 bits</DisplayString>
</Type>
<Type Name="llvm::ArrayRef&lt;*&gt;">
<DisplayString Condition="Length == 0">empty</DisplayString>
<DisplayString Condition="Length != 0">{{ size={Length} }}</DisplayString>
Expand Down

0 comments on commit f84ae54

Please sign in to comment.