summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Spertus <mike@spertus.com>2019-06-30 21:54:34 +0000
committerMike Spertus <mike@spertus.com>2019-06-30 21:54:34 +0000
commitbb0b44deaab43dca5717141018a7346c76d621a7 (patch)
tree9a33c221e2c1accfd92225e3c79e6fe7bde4ad2b
parent135cf982e8ee9e2f0d8af1b33ee214737e1ae707 (diff)
downloadbcm5719-llvm-bb0b44deaab43dca5717141018a7346c76d621a7.tar.gz
bcm5719-llvm-bb0b44deaab43dca5717141018a7346c76d621a7.zip
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
-rw-r--r--llvm/utils/LLVMVisualizers/llvm.natvis19
1 files changed, 5 insertions, 14 deletions
diff --git a/llvm/utils/LLVMVisualizers/llvm.natvis b/llvm/utils/LLVMVisualizers/llvm.natvis
index f4ed0787689..0000519ce05 100644
--- a/llvm/utils/LLVMVisualizers/llvm.natvis
+++ b/llvm/utils/LLVMVisualizers/llvm.natvis
@@ -76,37 +76,28 @@ For later versions of Visual Studio, no setup is required.
</Expand>
</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&lt;*&gt;">
+ <DisplayString IncludeView="ptr">{($T1)(Value &amp; $T5::PointerBitMask)}</DisplayString>
+ <DisplayString IncludeView="int">{($T3)((Value &gt;&gt; $T5::IntShift) &amp; $T5::IntMask)}</DisplayString>
<DisplayString>{$T5::IntMask}: {($T1)(Value &amp; $T5::PointerBitMask)} [{($T3)((Value &gt;&gt; $T5::IntShift) &amp; $T5::IntMask)}]</DisplayString>
<Expand>
<Item Name="[ptr]">($T1)(Value &amp; $T5::PointerBitMask)</Item>
<Item Name="[int]">($T3)((Value &gt;&gt; $T5::IntShift) &amp; $T5::IntMask)</Item>
</Expand>
</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 -->
+ <!-- PointerUnion types -->
<Type Name="llvm::pointer_union_detail::PointerUnionMembers&lt;*&gt;">
- <DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 0">
- {*($T4)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
- </DisplayString>
<DisplayString Optional="true" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 0">
{($T4)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
</DisplayString>
- <DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 1">
- {*($T5)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
- </DisplayString>
<DisplayString Optional="true" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 1">
{($T5)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
</DisplayString>
- <DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 2">
- {*($T6)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
- </DisplayString>
<DisplayString Optional="true" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 2">
{($T6)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
</DisplayString>
- <DisplayString Optional="true" IncludeView="deref" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 3">
- {*($T7)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
- </DisplayString>
<DisplayString Optional="true" Condition="((Val.Value&gt;&gt;$T2::InfoTy::IntShift) &amp; $T2::InfoTy::IntMask) == 3">
{($T7)(Val.Value &amp; $T2::InfoTy::PointerBitMask)}
</DisplayString>
OpenPOWER on IntegriCloud