forked from OSchip/llvm-project
Fix MSVC PointerUnion visualizer
Differential Revision: https://reviews.llvm.org/D56186 llvm-svn: 350250
This commit is contained in:
parent
5e164b53db
commit
8cfefb5087
|
@ -42,6 +42,8 @@ template <typename PointerTy, unsigned IntBits, typename IntType = unsigned,
|
|||
typename PtrTraits = PointerLikeTypeTraits<PointerTy>,
|
||||
typename Info = PointerIntPairInfo<PointerTy, IntBits, PtrTraits>>
|
||||
class PointerIntPair {
|
||||
// Used by MSVC visualizer and generally helpful for debugging/visualizing.
|
||||
using InfoTy = Info;
|
||||
intptr_t Value = 0;
|
||||
|
||||
public:
|
||||
|
|
|
@ -35,6 +35,7 @@ For later versions of Visual Studio, no setup is required.
|
|||
<DisplayString IncludeView ="elt4">, /* {Size - 4} more*/ </DisplayString>
|
||||
<DisplayString Condition="Size == 0">empty</DisplayString>
|
||||
<DisplayString Condition="Size != 0">{{{*this,view(elt0)}}}</DisplayString>
|
||||
<DisplayString>Uninitialized</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[size]">Size</Item>
|
||||
<Item Name="[capacity]">Capacity</Item>
|
||||
|
@ -93,11 +94,13 @@ For later versions of Visual Studio, no setup is required.
|
|||
</Type>
|
||||
|
||||
<Type Name="llvm::PointerUnion<*,*>">
|
||||
<DisplayString Condition="((Val.Value >> Val.IntShift) & Val.IntMask) == 0">{"$T1", s8b}: {($T1)(Val.Value & Val.PointerBitMask)}</DisplayString>
|
||||
<DisplayString Condition="((Val.Value >> Val.IntShift) & Val.IntMask) != 0">{"$T2", s8b}: {($T2)(Val.Value & Val.PointerBitMask)}</DisplayString>
|
||||
<DisplayString Condition="((Val.Value >> ValTy::InfoTy::IntShift) & ValTy::InfoTy::IntMask) == 0">{"$T1", s8b}: {($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>
|
||||
<Expand>
|
||||
<ExpandedItem Condition="((Val.Value >> Val.IntShift) & Val.IntMask) == 0">($T1)(Val.Value & Val.PointerBitMask)</ExpandedItem>
|
||||
<ExpandedItem Condition="((Val.Value >> Val.IntShift) & Val.IntMask) != 0">($T2)(Val.Value & Val.PointerBitMask)</ExpandedItem>
|
||||
<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="[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>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
|
|
Loading…
Reference in New Issue