[llvm] r337644 - Fix the MSVC Visualizers for SmallVector classes.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 21 08:38:47 PDT 2018
Author: zturner
Date: Sat Jul 21 08:38:47 2018
New Revision: 337644
URL: http://llvm.org/viewvc/llvm-project?rev=337644&view=rev
Log:
Fix the MSVC Visualizers for SmallVector classes.
Recent changes to the internal structure of SmallVector<> broke
all of the MSVC visualizers. This fixes them.
Modified:
llvm/trunk/utils/LLVMVisualizers/llvm.natvis
Modified: llvm/trunk/utils/LLVMVisualizers/llvm.natvis
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/LLVMVisualizers/llvm.natvis?rev=337644&r1=337643&r2=337644&view=diff
==============================================================================
--- llvm/trunk/utils/LLVMVisualizers/llvm.natvis (original)
+++ llvm/trunk/utils/LLVMVisualizers/llvm.natvis Sat Jul 21 08:38:47 2018
@@ -10,36 +10,36 @@ For later versions of Visual Studio, no
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<!-- VS2013 -->
<Type Name="llvm::SmallVectorImpl<*>" Priority="MediumLow">
- <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) == 0">empty</DisplayString>
- <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) != 0">{{ size={($T1*)EndX - ($T1*)BeginX} }}</DisplayString>
+ <DisplayString Condition="Size == 0">empty</DisplayString>
+ <DisplayString Condition="Size != 0">{{ size={Size} }}</DisplayString>
<Expand>
- <Item Name="[size]">($T1*)EndX - ($T1*)BeginX</Item>
- <Item Name="[capacity]">($T1*)CapacityX - ($T1*)BeginX</Item>
+ <Item Name="[size]">Size</Item>
+ <Item Name="[capacity]">Capacity</Item>
<ArrayItems>
- <Size>($T1*)EndX - ($T1*)BeginX</Size>
+ <Size>Size</Size>
<ValuePointer>($T1*)BeginX</ValuePointer>
</ArrayItems>
</Expand>
</Type>
<!-- VS2015 and up -->
<Type Name="llvm::SmallVectorImpl<*>">
- <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 ="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 ="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 ="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 ="elt4" Condition="(($T1*)EndX - ($T1*)BeginX) == 4"></DisplayString>
- <DisplayString IncludeView ="elt4">, /* {(($T1*)EndX - ($T1*)BeginX) - 4} more*/ </DisplayString>
- <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) == 0">empty</DisplayString>
- <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) != 0">{{{*this,view(elt0)}}}</DisplayString>
+ <DisplayString IncludeView ="elt4" Condition="Size == 4"></DisplayString>
+ <DisplayString IncludeView ="elt4">, /* {Size - 4} more*/ </DisplayString>
+ <DisplayString Condition="Size == 0">empty</DisplayString>
+ <DisplayString Condition="Size != 0">{{{*this,view(elt0)}}}</DisplayString>
<Expand>
- <Item Name="[size]">($T1*)EndX - ($T1*)BeginX</Item>
- <Item Name="[capacity]">($T1*)CapacityX - ($T1*)BeginX</Item>
+ <Item Name="[size]">Size</Item>
+ <Item Name="[capacity]">Capacity</Item>
<ArrayItems>
- <Size>($T1*)EndX - ($T1*)BeginX</Size>
+ <Size>Size</Size>
<ValuePointer>($T1*)BeginX</ValuePointer>
</ArrayItems>
</Expand>
@@ -56,13 +56,13 @@ For later versions of Visual Studio, no
</Expand>
</Type>
<Type Name="llvm::SmallString<*>">
- <DisplayString>{(const char*)BeginX,[(char*)EndX - (char*)BeginX] na}</DisplayString>
- <StringView>(const char*)BeginX,[(char*)EndX - (char*)BeginX]</StringView>
+ <DisplayString>{(const char*)BeginX,[Size] na}</DisplayString>
+ <StringView>(const char*)BeginX,[Size]</StringView>
<Expand>
- <Item Name="[size]">(char*)EndX - (char*)BeginX</Item>
- <Item Name="[capacity]">(char*)CapacityX - (char*)BeginX</Item>
+ <Item Name="[size]">Size</Item>
+ <Item Name="[capacity]">Capacity</Item>
<ArrayItems>
- <Size>(char*)EndX - (char*)BeginX</Size>
+ <Size>Size</Size>
<ValuePointer>(char*)BeginX</ValuePointer>
</ArrayItems>
</Expand>
More information about the llvm-commits
mailing list