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

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
This commit is contained in:
Mike Spertus 2019-06-02 23:33:32 +00:00
parent 5aa2b4479f
commit 752a16bcdf

View File

@ -85,98 +85,61 @@ For later versions of Visual Studio, no setup is required.
</Expand>
</Type>
<Type Name="llvm::PointerIntPair&lt;*,*,*,*&gt;">
<Type Name="llvm::PointerIntPair&lt;*&gt;">
<DisplayString>{$T5::IntMask}: {($T1)(Value &amp; $T5::PointerBitMask)} [{($T3)((Value &gt;&gt; $T5::IntShift) &amp; $T5::IntMask)}]</DisplayString>
<Expand>
<Item Name="[ptr]">($T1)(Value &amp; $T5::PointerBitMask)</Item>
<Item Name="[int]">($T3)((Value &gt;&gt; $T5::IntShift) &amp; $T5::IntMask)</Item>
</Expand>
</Type>
<!-- PointerUnion types - In addition to the regular view, which displays the pointer, there is a "deref" view that
displays the pointed to object, which is often needed by other visualizers -->
<Type Name="llvm::PointerUnion&lt;*,*&gt;">
<DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value &gt;&gt; ValTy::InfoTy::IntShift) &amp; ValTy::InfoTy::IntMask) == 0">{*($T1)(Val.Value &amp; ValTy::InfoTy::PointerBitMask)}</DisplayString>
<DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value &gt;&gt; ValTy::InfoTy::IntShift) &amp; ValTy::InfoTy::IntMask) != 0">{*($T2)(Val.Value &amp; ValTy::InfoTy::PointerBitMask)}</DisplayString>
<DisplayString Optional="true" Condition="((Val.Value &gt;&gt; ValTy::InfoTy::IntShift) &amp; ValTy::InfoTy::IntMask) == 0">{"$T1", s8b}: {($T1)(Val.Value &amp; ValTy::InfoTy::PointerBitMask)}</DisplayString>
<DisplayString Optional="true" Condition="((Val.Value &gt;&gt; ValTy::InfoTy::IntShift) &amp; ValTy::InfoTy::IntMask) != 0">{"$T2", s8b}: {($T2)(Val.Value &amp; ValTy::InfoTy::PointerBitMask)}</DisplayString>
<Type Name="llvm::pointer_union_detail::PointerUnionMembers&lt;*&gt;">
<DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 0">
{*($T4)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
</DisplayString>
<DisplayString Optional="true" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 0">
{($T4)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
</DisplayString>
<DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 1">
{*($T5)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
</DisplayString>
<DisplayString Optional="true" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 1">
{($T5)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
</DisplayString>
<DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 2">
{*($T6)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
</DisplayString>
<DisplayString Optional="true" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 2">
{($T6)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
</DisplayString>
<DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 3">
{*($T7)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
</DisplayString>
<DisplayString Optional="true" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 3">
{($T7)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
</DisplayString>
<DisplayString>Unexpected index in PointerUnion: {(Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask}</DisplayString>
<Expand>
<Item Name="[Holds]" Condition="((Val.Value &gt;&gt; ValTy::InfoTy::IntShift) &amp; ValTy::InfoTy::IntMask) == 0">"$T1", s8b</Item>
<Item Name="[Ptr]" Optional="true" Condition="((Val.Value &gt;&gt; ValTy::InfoTy::IntShift) &amp; ValTy::InfoTy::IntMask) == 0">($T1)(Val.Value &amp; ValTy::InfoTy::PointerBitMask)</Item>
<Item Name="[Holds]" Condition="((Val.Value &gt;&gt; ValTy::InfoTy::IntShift) &amp; ValTy::InfoTy::IntMask) != 0">"$T2", s8b</Item>
<Item Name="[Ptr]" Optional="true" Condition="((Val.Value &gt;&gt; ValTy::InfoTy::IntShift) &amp; ValTy::InfoTy::IntMask) != 0">($T2)(Val.Value &amp; ValTy::InfoTy::PointerBitMask)</Item>
</Expand>
</Type>
<Type Name="llvm::PointerUnion3&lt;*,*,*&gt;">
<DisplayString Optional="true" IncludeView="deref" Condition="(Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1">{Val,view(deref)}</DisplayString>
<DisplayString Optional="true" IncludeView="deref">{*(InnerUnion*)&amp;Val.Val.Value,view(deref)}</DisplayString>
<DisplayString Condition="(Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1">{Val}</DisplayString>
<DisplayString>{*(InnerUnion*)&amp;Val.Val.Value}</DisplayString>
<Expand>
<Item Name="[Holds]" Condition="(Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1">"$T3", s8b</Item>
<Item Name="[Ptr]" Condition="(Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1">($T3)(Val.Val.Value &amp; ValTy::ValTy::InfoTy::PointerBitMask)</Item>
<ExpandedItem Condition="!((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1)">*(InnerUnion*)&amp;Val.Val.Value</ExpandedItem>
</Expand>
</Type>
<Type Name="llvm::PointerUnion4&lt;*,*,*,*&gt;">
<DisplayString Optional="true" IncludeView="deref"
Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 0 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion1::ValTy::InfoTy::IntShift) &amp; 1) == 0">
{*($T1)(Val.Val.Value &amp; InnerUnion1::ValTy::InfoTy::PointerBitMask)}
</DisplayString>
<DisplayString Optional="true" IncludeView="deref"
Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 0 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion1::ValTy::InfoTy::IntShift) &amp; 1) == 1">
{*($T2)(Val.Val.Value &amp; InnerUnion1::ValTy::InfoTy::PointerBitMask)}
</DisplayString>
<DisplayString Optional="true" IncludeView="deref"
Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 1 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion2::ValTy::InfoTy::IntShift) &amp; 1) == 0">
{*($T3)(Val.Val.Value &amp; InnerUnion2::ValTy::InfoTy::PointerBitMask)}
</DisplayString>
<DisplayString Optional="true" IncludeView="deref"
Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 1 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion2::ValTy::InfoTy::IntShift) &amp; 1) == 1">
{*($T4)(Val.Val.Value &amp; InnerUnion2::ValTy::InfoTy::PointerBitMask)}
</DisplayString>
<DisplayString Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 0 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion1::ValTy::InfoTy::IntShift) &amp; 1) == 0">
{"$T1", s8b}: {($T1)(Val.Val.Value &amp; InnerUnion1::ValTy::InfoTy::PointerBitMask)}
</DisplayString>
<DisplayString Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 0 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion1::ValTy::InfoTy::IntShift) &amp; 1) == 1">
{"$T2", s8b}: {($T2)(Val.Val.Value &amp; InnerUnion1::ValTy::InfoTy::PointerBitMask)}
</DisplayString>
<DisplayString Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 1 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion2::ValTy::InfoTy::IntShift) &amp; 1) == 0">
{"$T3", s8b}: {($T3)(Val.Val.Value &amp; InnerUnion2::ValTy::InfoTy::PointerBitMask)}
</DisplayString>
<DisplayString Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 1 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion2::ValTy::InfoTy::IntShift) &amp; 1) == 1">
{"$T4", s8b}: {($T4)(Val.Val.Value &amp; InnerUnion2::ValTy::InfoTy::PointerBitMask)}
</DisplayString>
<Expand>
<Item Name="[Holds]" Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 0 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion1::ValTy::InfoTy::IntShift) &amp; 1) == 0">
"$T1", s8b
<Item Name="[Holds]" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 0">"$T4",s8b</Item>
<Item Name="[Ptr]" Optional="true" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 0">
($T4)(Val.Value &amp; $T2::InfoTy::PointerBitMask)
</Item>
<Item Name="[Ptr]" Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 0 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion1::ValTy::InfoTy::IntShift) &amp; 1) == 0">
($T1)(Val.Val.Value &amp; InnerUnion1::ValTy::InfoTy::PointerBitMask)
<Item Name="[Holds]" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 1">"$T5",s8b</Item>
<Item Name="[Ptr]" Optional="true" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 1">
($T5)(Val.Value &amp; $T2::InfoTy::PointerBitMask)
</Item>
<Item Name="[Holds]" Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 0 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion1::ValTy::InfoTy::IntShift) &amp; 1) == 1">
"$T2", s8b
<Item Name="[Holds]" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 2">"$T6",s8b</Item>
<Item Name="[Ptr]" Optional="true" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 2">
($T6)(Val.Value &amp; $T2::InfoTy::PointerBitMask)
</Item>
<Item Name="[Ptr]" Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 0 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion1::ValTy::InfoTy::IntShift) &amp; 1) == 1">
($T2)(Val.Val.Value &amp; InnerUnion1::ValTy::InfoTy::PointerBitMask)
</Item>
<Item Name="[Holds]" Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 1 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion2::ValTy::InfoTy::IntShift) &amp; 1) == 0">
"$T3", s8b
</Item>
<Item Name="[Ptr]" Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 1 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion2::ValTy::InfoTy::IntShift) &amp; 1) == 0">
($T3)(Val.Val.Value &amp; InnerUnion1::ValTy::InfoTy::PointerBitMask)
</Item>
<Item Name="[Holds]" Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 1 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion2::ValTy::InfoTy::IntShift) &amp; 1) == 1">
"$T4", s8b
</Item>
<Item Name="[Ptr]" Condition="((Val.Val.Value &gt;&gt; ValTy::ValTy::InfoTy::IntShift) &amp; 1) == 1 &amp;&amp; ((Val.Val.Value &gt;&gt; InnerUnion2::ValTy::InfoTy::IntShift) &amp; 1) == 1">
($T4)(Val.Val.Value &amp; InnerUnion1::ValTy::InfoTy::PointerBitMask)
<Item Name="[Holds]" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 3">"$T6",s8b</Item>
<Item Name="[Ptr]" Optional="true" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 3">
($T7)(Val.Value &amp; $T2::InfoTy::PointerBitMask)
</Item>
</Expand>
</Type>
<Type Name="llvm::iplist&lt;*,*&gt;">
<DisplayString Condition="Head == 0">{{ empty }}</DisplayString>
<DisplayString Condition="Head != 0">{{ head={Head} }}</DisplayString>
@ -200,13 +163,13 @@ For later versions of Visual Studio, no setup is required.
</Type>
<Type Name="llvm::SmallPtrSet&lt;*,*&gt;">
<DisplayString Condition="CurArray == SmallArray">{{ [Small Mode] size={NumElements}, capacity={CurArraySize} }}</DisplayString>
<DisplayString Condition="CurArray != SmallArray">{{ [Big Mode] size={NumElements}, capacity={CurArraySize} }}</DisplayString>
<DisplayString Condition="CurArray == SmallArray">{{ [Small Mode] size={NumNonEmpty}, capacity={CurArraySize} }}</DisplayString>
<DisplayString Condition="CurArray != SmallArray">{{ [Big Mode] size={NumNonEmpty}, capacity={CurArraySize} }}</DisplayString>
<Expand>
<Item Name="[size]">NumElements</Item>
<Item Name="[size]">NumNonEmpty</Item>
<Item Name="[capacity]">CurArraySize</Item>
<ArrayItems>
<Size>CurArraySize</Size>
<Size>NumNonEmpty</Size>
<ValuePointer>($T1*)CurArray</ValuePointer>
</ArrayItems>
</Expand>