forked from OSchip/llvm-project
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
This commit is contained in:
parent
b46680407d
commit
6fe3886f7e
|
@ -93,19 +93,25 @@ For later versions of Visual Studio, no setup is required.
|
||||||
</Expand>
|
</Expand>
|
||||||
</Type>
|
</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<*,*>">
|
<Type Name="llvm::PointerUnion<*,*>">
|
||||||
<DisplayString Condition="((Val.Value >> ValTy::InfoTy::IntShift) & ValTy::InfoTy::IntMask) == 0">{"$T1", s8b}: {($T1)(Val.Value & ValTy::InfoTy::PointerBitMask)}</DisplayString>
|
<DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value >> ValTy::InfoTy::IntShift) & ValTy::InfoTy::IntMask) == 0">{*($T1)(Val.Value & ValTy::InfoTy::PointerBitMask)}</DisplayString>
|
||||||
<DisplayString Condition="((Val.Value >> ValTy::InfoTy::IntShift) & ValTy::InfoTy::IntMask) != 0">{"$T2", s8b}: {($T2)(Val.Value & ValTy::InfoTy::PointerBitMask)}</DisplayString>
|
<DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value >> ValTy::InfoTy::IntShift) & ValTy::InfoTy::IntMask) != 0">{*($T2)(Val.Value & ValTy::InfoTy::PointerBitMask)}</DisplayString>
|
||||||
|
<DisplayString Optional="true" Condition="((Val.Value >> ValTy::InfoTy::IntShift) & ValTy::InfoTy::IntMask) == 0">{"$T1", s8b}: {($T1)(Val.Value & ValTy::InfoTy::PointerBitMask)}</DisplayString>
|
||||||
|
<DisplayString Optional="true" Condition="((Val.Value >> ValTy::InfoTy::IntShift) & ValTy::InfoTy::IntMask) != 0">{"$T2", s8b}: {($T2)(Val.Value & ValTy::InfoTy::PointerBitMask)}</DisplayString>
|
||||||
<Expand>
|
<Expand>
|
||||||
<Item Name="[Holds]" Condition="((Val.Value >> ValTy::InfoTy::IntShift) & ValTy::InfoTy::IntMask) == 0">"$T1", s8b</Item>
|
<Item Name="[Holds]" Condition="((Val.Value >> ValTy::InfoTy::IntShift) & ValTy::InfoTy::IntMask) == 0">"$T1", s8b</Item>
|
||||||
<Item Name="[Ptr]" Condition="((Val.Value >> ValTy::InfoTy::IntShift) & ValTy::InfoTy::IntMask) == 0">($T1)(Val.Value & ValTy::InfoTy::PointerBitMask)</Item>
|
<Item Name="[Ptr]" Optional="true" Condition="((Val.Value >> ValTy::InfoTy::IntShift) & ValTy::InfoTy::IntMask) == 0">($T1)(Val.Value & ValTy::InfoTy::PointerBitMask)</Item>
|
||||||
<Item Name="[Holds]" Condition="((Val.Value >> ValTy::InfoTy::IntShift) & ValTy::InfoTy::IntMask) != 0">"$T2", s8b</Item>
|
<Item Name="[Holds]" Condition="((Val.Value >> ValTy::InfoTy::IntShift) & ValTy::InfoTy::IntMask) != 0">"$T2", s8b</Item>
|
||||||
<Item Name="[Ptr]" Condition="((Val.Value >> ValTy::InfoTy::IntShift) & ValTy::InfoTy::IntMask) != 0">($T2)(Val.Value & ValTy::InfoTy::PointerBitMask)</Item>
|
<Item Name="[Ptr]" Optional="true" Condition="((Val.Value >> ValTy::InfoTy::IntShift) & ValTy::InfoTy::IntMask) != 0">($T2)(Val.Value & ValTy::InfoTy::PointerBitMask)</Item>
|
||||||
</Expand>
|
</Expand>
|
||||||
</Type>
|
</Type>
|
||||||
|
|
||||||
<Type Name="llvm::PointerUnion3<*,*,*>">
|
<Type Name="llvm::PointerUnion3<*,*,*>">
|
||||||
<DisplayString Condition="(Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1">{"$T3", s8b}: {($T3)(Val.Val.Value & ValTy::ValTy::InfoTy::PointerBitMask)}</DisplayString>
|
<DisplayString Optional="true" IncludeView="deref" Condition="(Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1">{Val,view(deref)}</DisplayString>
|
||||||
|
<DisplayString Optional="true" IncludeView="deref">{*(InnerUnion*)&Val.Val.Value,view(deref)}</DisplayString>
|
||||||
|
<DisplayString Condition="(Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1">{Val}</DisplayString>
|
||||||
<DisplayString>{*(InnerUnion*)&Val.Val.Value}</DisplayString>
|
<DisplayString>{*(InnerUnion*)&Val.Val.Value}</DisplayString>
|
||||||
<Expand>
|
<Expand>
|
||||||
<Item Name="[Holds]" Condition="(Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1">"$T3", s8b</Item>
|
<Item Name="[Holds]" Condition="(Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1">"$T3", s8b</Item>
|
||||||
|
@ -115,6 +121,22 @@ For later versions of Visual Studio, no setup is required.
|
||||||
</Type>
|
</Type>
|
||||||
|
|
||||||
<Type Name="llvm::PointerUnion4<*,*,*,*>">
|
<Type Name="llvm::PointerUnion4<*,*,*,*>">
|
||||||
|
<DisplayString Optional="true" IncludeView="deref"
|
||||||
|
Condition="((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1) == 0 && ((Val.Val.Value >> InnerUnion1::ValTy::InfoTy::IntShift) & 1) == 0">
|
||||||
|
{*($T1)(Val.Val.Value & InnerUnion1::ValTy::InfoTy::PointerBitMask)}
|
||||||
|
</DisplayString>
|
||||||
|
<DisplayString Optional="true" IncludeView="deref"
|
||||||
|
Condition="((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1) == 0 && ((Val.Val.Value >> InnerUnion1::ValTy::InfoTy::IntShift) & 1) == 1">
|
||||||
|
{*($T2)(Val.Val.Value & InnerUnion1::ValTy::InfoTy::PointerBitMask)}
|
||||||
|
</DisplayString>
|
||||||
|
<DisplayString Optional="true" IncludeView="deref"
|
||||||
|
Condition="((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1) == 1 && ((Val.Val.Value >> InnerUnion2::ValTy::InfoTy::IntShift) & 1) == 0">
|
||||||
|
{*($T3)(Val.Val.Value & InnerUnion2::ValTy::InfoTy::PointerBitMask)}
|
||||||
|
</DisplayString>
|
||||||
|
<DisplayString Optional="true" IncludeView="deref"
|
||||||
|
Condition="((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1) == 1 && ((Val.Val.Value >> InnerUnion2::ValTy::InfoTy::IntShift) & 1) == 1">
|
||||||
|
{*($T4)(Val.Val.Value & InnerUnion2::ValTy::InfoTy::PointerBitMask)}
|
||||||
|
</DisplayString>
|
||||||
<DisplayString Condition="((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1) == 0 && ((Val.Val.Value >> InnerUnion1::ValTy::InfoTy::IntShift) & 1) == 0">
|
<DisplayString Condition="((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1) == 0 && ((Val.Val.Value >> InnerUnion1::ValTy::InfoTy::IntShift) & 1) == 0">
|
||||||
{"$T1", s8b}: {($T1)(Val.Val.Value & InnerUnion1::ValTy::InfoTy::PointerBitMask)}
|
{"$T1", s8b}: {($T1)(Val.Val.Value & InnerUnion1::ValTy::InfoTy::PointerBitMask)}
|
||||||
</DisplayString>
|
</DisplayString>
|
||||||
|
|
Loading…
Reference in New Issue