[PATCH] D56186: Fix MSVC PointerUnion visualization
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 2 11:30:34 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL350250: Fix MSVC PointerUnion visualizer (authored by mps, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D56186?vs=179801&id=179901#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56186/new/
https://reviews.llvm.org/D56186
Files:
llvm/trunk/include/llvm/ADT/PointerIntPair.h
llvm/trunk/utils/LLVMVisualizers/llvm.natvis
Index: llvm/trunk/include/llvm/ADT/PointerIntPair.h
===================================================================
--- llvm/trunk/include/llvm/ADT/PointerIntPair.h
+++ llvm/trunk/include/llvm/ADT/PointerIntPair.h
@@ -42,6 +42,8 @@
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:
Index: llvm/trunk/utils/LLVMVisualizers/llvm.natvis
===================================================================
--- llvm/trunk/utils/LLVMVisualizers/llvm.natvis
+++ llvm/trunk/utils/LLVMVisualizers/llvm.natvis
@@ -35,6 +35,7 @@
<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 @@
</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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56186.179901.patch
Type: text/x-patch
Size: 2958 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190102/c281022a/attachment.bin>
More information about the llvm-commits
mailing list