Clean up MSVC visualization of LLVM pointer types
Create separate natvis ptr and int views for PointerIntPair. These are convenient in watch Windows and will be used by Clang visualizers to be checked in shortly Also, removed deref views as the MSVC na format has done the same thing natively since MSVC2013. llvm-svn: 364723
This commit is contained in:
parent
135cf982e8
commit
bb0b44deaa
|
@ -76,37 +76,28 @@ For later versions of Visual Studio, no setup is required.
|
||||||
</Expand>
|
</Expand>
|
||||||
</Type>
|
</Type>
|
||||||
|
|
||||||
|
<!-- PointerIntPair. In addition to the regular view, it is possible to view just the pointer or just the int
|
||||||
|
The same code is duplicated from the regular viewer to improve the performance of the common case -->
|
||||||
<Type Name="llvm::PointerIntPair<*>">
|
<Type Name="llvm::PointerIntPair<*>">
|
||||||
|
<DisplayString IncludeView="ptr">{($T1)(Value & $T5::PointerBitMask)}</DisplayString>
|
||||||
|
<DisplayString IncludeView="int">{($T3)((Value >> $T5::IntShift) & $T5::IntMask)}</DisplayString>
|
||||||
<DisplayString>{$T5::IntMask}: {($T1)(Value & $T5::PointerBitMask)} [{($T3)((Value >> $T5::IntShift) & $T5::IntMask)}]</DisplayString>
|
<DisplayString>{$T5::IntMask}: {($T1)(Value & $T5::PointerBitMask)} [{($T3)((Value >> $T5::IntShift) & $T5::IntMask)}]</DisplayString>
|
||||||
<Expand>
|
<Expand>
|
||||||
<Item Name="[ptr]">($T1)(Value & $T5::PointerBitMask)</Item>
|
<Item Name="[ptr]">($T1)(Value & $T5::PointerBitMask)</Item>
|
||||||
<Item Name="[int]">($T3)((Value >> $T5::IntShift) & $T5::IntMask)</Item>
|
<Item Name="[int]">($T3)((Value >> $T5::IntShift) & $T5::IntMask)</Item>
|
||||||
</Expand>
|
</Expand>
|
||||||
</Type>
|
</Type>
|
||||||
<!-- PointerUnion types - In addition to the regular view, which displays the pointer, there is a "deref" view that
|
<!-- PointerUnion types -->
|
||||||
displays the pointed to object, which is often needed by other visualizers -->
|
|
||||||
<Type Name="llvm::pointer_union_detail::PointerUnionMembers<*>">
|
<Type Name="llvm::pointer_union_detail::PointerUnionMembers<*>">
|
||||||
<DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value>>$T2::InfoTy::IntShift) & $T2::InfoTy::IntMask) == 0">
|
|
||||||
{*($T4)(Val.Value & $T2::InfoTy::PointerBitMask)}
|
|
||||||
</DisplayString>
|
|
||||||
<DisplayString Optional="true" Condition="((Val.Value>>$T2::InfoTy::IntShift) & $T2::InfoTy::IntMask) == 0">
|
<DisplayString Optional="true" Condition="((Val.Value>>$T2::InfoTy::IntShift) & $T2::InfoTy::IntMask) == 0">
|
||||||
{($T4)(Val.Value & $T2::InfoTy::PointerBitMask)}
|
{($T4)(Val.Value & $T2::InfoTy::PointerBitMask)}
|
||||||
</DisplayString>
|
</DisplayString>
|
||||||
<DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value>>$T2::InfoTy::IntShift) & $T2::InfoTy::IntMask) == 1">
|
|
||||||
{*($T5)(Val.Value & $T2::InfoTy::PointerBitMask)}
|
|
||||||
</DisplayString>
|
|
||||||
<DisplayString Optional="true" Condition="((Val.Value>>$T2::InfoTy::IntShift) & $T2::InfoTy::IntMask) == 1">
|
<DisplayString Optional="true" Condition="((Val.Value>>$T2::InfoTy::IntShift) & $T2::InfoTy::IntMask) == 1">
|
||||||
{($T5)(Val.Value & $T2::InfoTy::PointerBitMask)}
|
{($T5)(Val.Value & $T2::InfoTy::PointerBitMask)}
|
||||||
</DisplayString>
|
</DisplayString>
|
||||||
<DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value>>$T2::InfoTy::IntShift) & $T2::InfoTy::IntMask) == 2">
|
|
||||||
{*($T6)(Val.Value & $T2::InfoTy::PointerBitMask)}
|
|
||||||
</DisplayString>
|
|
||||||
<DisplayString Optional="true" Condition="((Val.Value>>$T2::InfoTy::IntShift) & $T2::InfoTy::IntMask) == 2">
|
<DisplayString Optional="true" Condition="((Val.Value>>$T2::InfoTy::IntShift) & $T2::InfoTy::IntMask) == 2">
|
||||||
{($T6)(Val.Value & $T2::InfoTy::PointerBitMask)}
|
{($T6)(Val.Value & $T2::InfoTy::PointerBitMask)}
|
||||||
</DisplayString>
|
</DisplayString>
|
||||||
<DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value>>$T2::InfoTy::IntShift) & $T2::InfoTy::IntMask) == 3">
|
|
||||||
{*($T7)(Val.Value & $T2::InfoTy::PointerBitMask)}
|
|
||||||
</DisplayString>
|
|
||||||
<DisplayString Optional="true" Condition="((Val.Value>>$T2::InfoTy::IntShift) & $T2::InfoTy::IntMask) == 3">
|
<DisplayString Optional="true" Condition="((Val.Value>>$T2::InfoTy::IntShift) & $T2::InfoTy::IntMask) == 3">
|
||||||
{($T7)(Val.Value & $T2::InfoTy::PointerBitMask)}
|
{($T7)(Val.Value & $T2::InfoTy::PointerBitMask)}
|
||||||
</DisplayString>
|
</DisplayString>
|
||||||
|
|
Loading…
Reference in New Issue