1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

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
This commit is contained in:
Zachary Turner 2018-07-21 15:38:47 +00:00
parent 47d9e0be5b
commit 1e18ab12db

View File

@ -10,36 +10,36 @@ For later versions of Visual Studio, no setup is required.
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<!-- VS2013 --> <!-- VS2013 -->
<Type Name="llvm::SmallVectorImpl&lt;*&gt;" Priority="MediumLow"> <Type Name="llvm::SmallVectorImpl&lt;*&gt;" Priority="MediumLow">
<DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) == 0">empty</DisplayString> <DisplayString Condition="Size == 0">empty</DisplayString>
<DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) != 0">{{ size={($T1*)EndX - ($T1*)BeginX} }}</DisplayString> <DisplayString Condition="Size != 0">{{ size={Size} }}</DisplayString>
<Expand> <Expand>
<Item Name="[size]">($T1*)EndX - ($T1*)BeginX</Item> <Item Name="[size]">Size</Item>
<Item Name="[capacity]">($T1*)CapacityX - ($T1*)BeginX</Item> <Item Name="[capacity]">Capacity</Item>
<ArrayItems> <ArrayItems>
<Size>($T1*)EndX - ($T1*)BeginX</Size> <Size>Size</Size>
<ValuePointer>($T1*)BeginX</ValuePointer> <ValuePointer>($T1*)BeginX</ValuePointer>
</ArrayItems> </ArrayItems>
</Expand> </Expand>
</Type> </Type>
<!-- VS2015 and up --> <!-- VS2015 and up -->
<Type Name="llvm::SmallVectorImpl&lt;*&gt;"> <Type Name="llvm::SmallVectorImpl&lt;*&gt;">
<DisplayString IncludeView ="elt0" Condition="(($T1*)EndX - ($T1*)BeginX) == 0"></DisplayString> <DisplayString IncludeView ="elt0" Condition="Size == 0"></DisplayString>
<DisplayString IncludeView ="elt0">{(($T1*)BeginX)[0]}{*this,view(elt1)}</DisplayString> <DisplayString IncludeView ="elt0">{(($T1*)BeginX)[0]}{*this,view(elt1)}</DisplayString>
<DisplayString IncludeView ="elt1" Condition="(($T1*)EndX - ($T1*)BeginX) == 1"></DisplayString> <DisplayString IncludeView ="elt1" Condition="Size == 1"></DisplayString>
<DisplayString IncludeView ="elt1">, {(($T1*)BeginX)[1]}{*this,view(elt2)}</DisplayString> <DisplayString IncludeView ="elt1">, {(($T1*)BeginX)[1]}{*this,view(elt2)}</DisplayString>
<DisplayString IncludeView ="elt2" Condition="(($T1*)EndX - ($T1*)BeginX) == 2"></DisplayString> <DisplayString IncludeView ="elt2" Condition="Size == 2"></DisplayString>
<DisplayString IncludeView ="elt2">, {(($T1*)BeginX)[2]}{*this,view(elt3)}</DisplayString> <DisplayString IncludeView ="elt2">, {(($T1*)BeginX)[2]}{*this,view(elt3)}</DisplayString>
<DisplayString IncludeView ="elt3" Condition="(($T1*)EndX - ($T1*)BeginX) == 3"></DisplayString> <DisplayString IncludeView ="elt3" Condition="Size == 3"></DisplayString>
<DisplayString IncludeView ="elt3">, {(($T1*)BeginX)[2]}{*this,view(elt4)}</DisplayString> <DisplayString IncludeView ="elt3">, {(($T1*)BeginX)[2]}{*this,view(elt4)}</DisplayString>
<DisplayString IncludeView ="elt4" Condition="(($T1*)EndX - ($T1*)BeginX) == 4"></DisplayString> <DisplayString IncludeView ="elt4" Condition="Size == 4"></DisplayString>
<DisplayString IncludeView ="elt4">, /* {(($T1*)EndX - ($T1*)BeginX) - 4} more*/ </DisplayString> <DisplayString IncludeView ="elt4">, /* {Size - 4} more*/ </DisplayString>
<DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) == 0">empty</DisplayString> <DisplayString Condition="Size == 0">empty</DisplayString>
<DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) != 0">{{{*this,view(elt0)}}}</DisplayString> <DisplayString Condition="Size != 0">{{{*this,view(elt0)}}}</DisplayString>
<Expand> <Expand>
<Item Name="[size]">($T1*)EndX - ($T1*)BeginX</Item> <Item Name="[size]">Size</Item>
<Item Name="[capacity]">($T1*)CapacityX - ($T1*)BeginX</Item> <Item Name="[capacity]">Capacity</Item>
<ArrayItems> <ArrayItems>
<Size>($T1*)EndX - ($T1*)BeginX</Size> <Size>Size</Size>
<ValuePointer>($T1*)BeginX</ValuePointer> <ValuePointer>($T1*)BeginX</ValuePointer>
</ArrayItems> </ArrayItems>
</Expand> </Expand>
@ -56,13 +56,13 @@ For later versions of Visual Studio, no setup is required.
</Expand> </Expand>
</Type> </Type>
<Type Name="llvm::SmallString&lt;*&gt;"> <Type Name="llvm::SmallString&lt;*&gt;">
<DisplayString>{(const char*)BeginX,[(char*)EndX - (char*)BeginX] na}</DisplayString> <DisplayString>{(const char*)BeginX,[Size] na}</DisplayString>
<StringView>(const char*)BeginX,[(char*)EndX - (char*)BeginX]</StringView> <StringView>(const char*)BeginX,[Size]</StringView>
<Expand> <Expand>
<Item Name="[size]">(char*)EndX - (char*)BeginX</Item> <Item Name="[size]">Size</Item>
<Item Name="[capacity]">(char*)CapacityX - (char*)BeginX</Item> <Item Name="[capacity]">Capacity</Item>
<ArrayItems> <ArrayItems>
<Size>(char*)EndX - (char*)BeginX</Size> <Size>Size</Size>
<ValuePointer>(char*)BeginX</ValuePointer> <ValuePointer>(char*)BeginX</ValuePointer>
</ArrayItems> </ArrayItems>
</Expand> </Expand>