mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
Fix MSVC visualizer for PointerUnion4
Calculate which item is being held and then display it with the appropriate type. We also optimize the display of PointerUnion3 to take advantage of our knowing that the IntMask is always 1 in PointerUnion types llvm-svn: 350280
This commit is contained in:
parent
11e0e027ac
commit
7bf06060fd
@ -105,25 +105,53 @@ For later versions of Visual Studio, no setup is required.
|
||||
</Type>
|
||||
|
||||
<Type Name="llvm::PointerUnion3<*,*,*>">
|
||||
<DisplayString Condition="(Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & ValTy::ValTy::InfoTy::IntMask">{"$T3", s8b}: {($T3)(Val.Val.Value & ValTy::ValTy::InfoTy::PointerBitMask)}</DisplayString>
|
||||
<DisplayString Condition="(Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1">{"$T3", s8b}: {($T3)(Val.Val.Value & ValTy::ValTy::InfoTy::PointerBitMask)}</DisplayString>
|
||||
<DisplayString>{*(InnerUnion*)&Val.Val.Value}</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[Holds]" Condition="(Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & ValTy::ValTy::InfoTy::IntMask">"$T3", s8b</Item>
|
||||
<Item Name="[Ptr]" Condition="(Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & ValTy::ValTy::InfoTy::IntMask">($T3)(Val.Val.Value & ValTy::ValTy::InfoTy::PointerBitMask)</Item>
|
||||
<ExpandedItem Condition="!((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & ValTy::ValTy::InfoTy::IntMask)">*(InnerUnion*)&Val.Val.Value</ExpandedItem>
|
||||
<Item Name="[Holds]" Condition="(Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1">"$T3", s8b</Item>
|
||||
<Item Name="[Ptr]" Condition="(Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1">($T3)(Val.Val.Value & ValTy::ValTy::InfoTy::PointerBitMask)</Item>
|
||||
<ExpandedItem Condition="!((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1)">*(InnerUnion*)&Val.Val.Value</ExpandedItem>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="llvm::PointerUnion4<*,*,*,*>">
|
||||
<DisplayString Condition="(Val.Val.Value & 3) != 3 && (Val.Val.Value & 2) != 2 && (Val.Val.Value & 1) != 1">{"$T1", s8b}: {($T1)((Val.Val.Value >> 2) << 2)}</DisplayString>
|
||||
<DisplayString Condition="(Val.Val.Value & 3) != 3 && (Val.Val.Value & 2) == 2">{"$T2", s8b}: {($T2)((Val.Val.Value >> 2) << 2)}</DisplayString>
|
||||
<DisplayString Condition="(Val.Val.Value & 3) != 3 && (Val.Val.Value & 1) == 1">{"$T3", s8b}: {($T3)((Val.Val.Value >> 2) << 2)}</DisplayString>
|
||||
<DisplayString Condition="(Val.Val.Value & 3) == 3">{"$T4", s8b}: {($T4)((Val.Val.Value >> 2) << 2)}</DisplayString>
|
||||
<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)}
|
||||
</DisplayString>
|
||||
<DisplayString Condition="((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1) == 0 && ((Val.Val.Value >> InnerUnion1::ValTy::InfoTy::IntShift) & 1) == 1">
|
||||
{"$T2", s8b}: {($T2)(Val.Val.Value & InnerUnion1::ValTy::InfoTy::PointerBitMask)}
|
||||
</DisplayString>
|
||||
<DisplayString Condition="((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1) == 1 && ((Val.Val.Value >> InnerUnion2::ValTy::InfoTy::IntShift) & 1) == 0">
|
||||
{"$T3", s8b}: {($T3)(Val.Val.Value & InnerUnion2::ValTy::InfoTy::PointerBitMask)}
|
||||
</DisplayString>
|
||||
<DisplayString Condition="((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1) == 1 && ((Val.Val.Value >> InnerUnion2::ValTy::InfoTy::IntShift) & 1) == 1">
|
||||
{"$T4", s8b}: {($T4)(Val.Val.Value & InnerUnion2::ValTy::InfoTy::PointerBitMask)}
|
||||
</DisplayString>
|
||||
<Expand>
|
||||
<ExpandedItem Condition="(Val.Val.Value & 3) != 3 && (Val.Val.Value & 2) != 2 && (Val.Val.Value & 1) != 1">($T1)((Val.Val.Value >> 2) << 2)</ExpandedItem>
|
||||
<ExpandedItem Condition="(Val.Val.Value & 3) != 3 && (Val.Val.Value & 2) == 2">($T2)((Val.Val.Value >> 2) << 2)</ExpandedItem>
|
||||
<ExpandedItem Condition="(Val.Val.Value & 3) != 3 && (Val.Val.Value & 1) == 1">($T3)((Val.Val.Value >> 2) << 2)</ExpandedItem>
|
||||
<ExpandedItem Condition="(Val.Val.Value & 3) == 3">($T4)((Val.Val.Value >> 2) << 2)</ExpandedItem>
|
||||
<Item Name="[Holds]" Condition="((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1) == 0 && ((Val.Val.Value >> InnerUnion1::ValTy::InfoTy::IntShift) & 1) == 0">
|
||||
"$T1", s8b
|
||||
</Item>
|
||||
<Item Name="[Ptr]" 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)
|
||||
</Item>
|
||||
<Item Name="[Holds]" Condition="((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1) == 0 && ((Val.Val.Value >> InnerUnion1::ValTy::InfoTy::IntShift) & 1) == 1">
|
||||
"$T2", s8b
|
||||
</Item>
|
||||
<Item Name="[Ptr]" 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)
|
||||
</Item>
|
||||
<Item Name="[Holds]" Condition="((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1) == 1 && ((Val.Val.Value >> InnerUnion2::ValTy::InfoTy::IntShift) & 1) == 0">
|
||||
"$T3", s8b
|
||||
</Item>
|
||||
<Item Name="[Ptr]" Condition="((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1) == 1 && ((Val.Val.Value >> InnerUnion2::ValTy::InfoTy::IntShift) & 1) == 0">
|
||||
($T3)(Val.Val.Value & InnerUnion1::ValTy::InfoTy::PointerBitMask)
|
||||
</Item>
|
||||
<Item Name="[Holds]" Condition="((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1) == 1 && ((Val.Val.Value >> InnerUnion2::ValTy::InfoTy::IntShift) & 1) == 1">
|
||||
"$T4", s8b
|
||||
</Item>
|
||||
<Item Name="[Ptr]" Condition="((Val.Val.Value >> ValTy::ValTy::InfoTy::IntShift) & 1) == 1 && ((Val.Val.Value >> InnerUnion2::ValTy::InfoTy::IntShift) & 1) == 1">
|
||||
($T4)(Val.Val.Value & InnerUnion1::ValTy::InfoTy::PointerBitMask)
|
||||
</Item>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user