blob: 6c410a40ecbdc98eb43ad18163da4175ed66fa8f [file] [log] [blame]
Aaron Ballman2fde57c2013-01-25 23:37:25 +00001<?xml version="1.0" encoding="utf-8"?>
2<!--
3Visual Studio 2012 Native Debugging Visualizers for LLVM
4
5Put this file into "%USERPROFILE%\Documents\Visual Studio 2012\Visualizers"
6or create a symbolic link so it updates automatically.
7-->
8<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
Aaron Ballman2fde57c2013-01-25 23:37:25 +00009
10 <Type Name="llvm::SmallVectorImpl&lt;*&gt;">
11 <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) == 0">empty</DisplayString>
Stephen Hines36b56882014-04-23 16:57:46 -070012 <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) != 0">{{ size={($T1*)EndX - ($T1*)BeginX} }}</DisplayString>
Aaron Ballman2fde57c2013-01-25 23:37:25 +000013 <Expand>
14 <Item Name="[size]">($T1*)EndX - ($T1*)BeginX</Item>
15 <Item Name="[capacity]">($T1*)CapacityX - ($T1*)BeginX</Item>
16 <ArrayItems>
17 <Size>($T1*)EndX - ($T1*)BeginX</Size>
18 <ValuePointer>($T1*)BeginX</ValuePointer>
19 </ArrayItems>
20 </Expand>
21 </Type>
22
23 <Type Name="llvm::SmallString&lt;*&gt;">
24 <DisplayString>{BeginX,s}</DisplayString>
25 <StringView>BeginX,s</StringView>
26 <Expand>
27 <Item Name="[size]">(char*)EndX - (char*)BeginX</Item>
28 <Item Name="[capacity]">(char*)CapacityX - (char*)BeginX</Item>
29 <ArrayItems>
30 <Size>(char*)EndX - (char*)BeginX</Size>
31 <ValuePointer>(char*)BeginX</ValuePointer>
32 </ArrayItems>
33 </Expand>
34 </Type>
35
36 <Type Name="llvm::StringRef">
Stephen Hines36b56882014-04-23 16:57:46 -070037 <DisplayString>{Data,[Length]s}</DisplayString>
38 <StringView>Data,[Length]s</StringView>
Aaron Ballman2fde57c2013-01-25 23:37:25 +000039 <Expand>
Stephen Hines36b56882014-04-23 16:57:46 -070040 <Item Name="[size]">Length</Item>
Aaron Ballman2fde57c2013-01-25 23:37:25 +000041 <ArrayItems>
42 <Size>Length</Size>
43 <ValuePointer>Data</ValuePointer>
44 </ArrayItems>
45 </Expand>
46 </Type>
47
48 <Type Name="llvm::PointerIntPair&lt;*,*,*,*&gt;">
Stephen Hines36b56882014-04-23 16:57:46 -070049 <DisplayString>{(void*)(Value &amp; PointerBitMask)} [{($T3)((Value &gt;&gt; IntShift) &amp; IntMask)}]</DisplayString>
Aaron Ballman2fde57c2013-01-25 23:37:25 +000050 <Expand>
Stephen Hines36b56882014-04-23 16:57:46 -070051 <Item Name="[ptr]">($T1*)(Value &amp; PointerBitMask)</Item>
52 <Item Name="[int]">($T3)((Value &gt;&gt; IntShift) &amp; IntMask)</Item>
Aaron Ballman2fde57c2013-01-25 23:37:25 +000053 </Expand>
54 </Type>
55
56 <Type Name="llvm::PointerUnion&lt;*,*&gt;">
Stephen Hines36b56882014-04-23 16:57:46 -070057 <DisplayString Condition="((Val.Value &gt;&gt; Val.IntShift) &amp; Val.IntMask) == 0">{"$T1", s8b} {(void*)(Val.Value &amp; Val.PointerBitMask)}</DisplayString>
58 <DisplayString Condition="((Val.Value &gt;&gt; Val.IntShift) &amp; Val.IntMask) != 0">{"$T2", s8b} {(void*)(Val.Value &amp; Val.PointerBitMask)}</DisplayString>
Aaron Ballman2fde57c2013-01-25 23:37:25 +000059 <Expand>
Stephen Hines36b56882014-04-23 16:57:46 -070060 <ExpandedItem Condition="((Val.Value &gt;&gt; Val.IntShift) &amp; Val.IntMask) == 0">($T1)(Val.Value &amp; Val.PointerBitMask)</ExpandedItem>
61 <ExpandedItem Condition="((Val.Value &gt;&gt; Val.IntShift) &amp; Val.IntMask) != 0">($T2)(Val.Value &amp; Val.PointerBitMask)</ExpandedItem>
Aaron Ballman2fde57c2013-01-25 23:37:25 +000062 </Expand>
63 </Type>
64
65 <Type Name="llvm::PointerUnion3&lt;*,*,*&gt;">
Stephen Hines36b56882014-04-23 16:57:46 -070066 <DisplayString Condition="(Val.Val.Value &amp; 2) != 2 &amp;&amp; (Val.Val.Value &amp; 1) != 1">{"$T1", s8b} {(void*)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>
67 <DisplayString Condition="(Val.Val.Value &amp; 2) == 2">{"$T2", s8b} {(void*)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>
68 <DisplayString Condition="(Val.Val.Value &amp; 1) == 1">{"$T3", s8b} {(void*)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>
Aaron Ballman2fde57c2013-01-25 23:37:25 +000069 <Expand>
Stephen Hines36b56882014-04-23 16:57:46 -070070 <ExpandedItem Condition="(Val.Val.Value &amp; 2) != 2 &amp;&amp; (Val.Val.Value &amp; 1) != 1">($T1)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)</ExpandedItem>
71 <ExpandedItem Condition="(Val.Val.Value &amp; 2) == 2">($T2)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)</ExpandedItem>
72 <ExpandedItem Condition="(Val.Val.Value &amp; 1) == 1">($T3)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)</ExpandedItem>
Aaron Ballman2fde57c2013-01-25 23:37:25 +000073 </Expand>
74 </Type>
75
76 <Type Name="llvm::PointerUnion4&lt;*,*,*,*&gt;">
Stephen Hines36b56882014-04-23 16:57:46 -070077 <DisplayString Condition="(Val.Val.Value &amp; 3) != 3 &amp;&amp; (Val.Val.Value &amp; 2) != 2 &amp;&amp; (Val.Val.Value &amp; 1) != 1">{"$T1", s8b} {(void*)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>
78 <DisplayString Condition="(Val.Val.Value &amp; 3) != 3 &amp;&amp; (Val.Val.Value &amp; 2) == 2">{"$T2", s8b} {(void*)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>
79 <DisplayString Condition="(Val.Val.Value &amp; 3) != 3 &amp;&amp; (Val.Val.Value &amp; 1) == 1">{"$T3", s8b} {(void*)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>
80 <DisplayString Condition="(Val.Val.Value &amp; 3) == 3">{"$T4", s8b} {(void*)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>
Aaron Ballman2fde57c2013-01-25 23:37:25 +000081 <Expand>
Stephen Hines36b56882014-04-23 16:57:46 -070082 <ExpandedItem Condition="(Val.Val.Value &amp; 3) != 3 &amp;&amp; (Val.Val.Value &amp; 2) != 2 &amp;&amp; (Val.Val.Value &amp; 1) != 1">($T1)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)</ExpandedItem>
83 <ExpandedItem Condition="(Val.Val.Value &amp; 3) != 3 &amp;&amp; (Val.Val.Value &amp; 2) == 2">($T2)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)</ExpandedItem>
84 <ExpandedItem Condition="(Val.Val.Value &amp; 3) != 3 &amp;&amp; (Val.Val.Value &amp; 1) == 1">($T3)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)</ExpandedItem>
85 <ExpandedItem Condition="(Val.Val.Value &amp; 3) == 3">($T4)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)</ExpandedItem>
Aaron Ballman2fde57c2013-01-25 23:37:25 +000086 </Expand>
87 </Type>
88
89 <Type Name="llvm::iplist&lt;*,*&gt;">
90 <DisplayString Condition="Head == 0">{{ empty }}</DisplayString>
91 <DisplayString Condition="Head != 0">{{ head={Head} }}</DisplayString>
92 <Expand>
93 <LinkedListItems>
94 <HeadPointer>Head</HeadPointer>
95 <NextPointer>Next</NextPointer>
96 <ValueNode>this</ValueNode>
97 </LinkedListItems>
98 </Expand>
99 </Type>
100
101 <Type Name="llvm::IntrusiveRefCntPtr&lt;*&gt;">
102 <DisplayString Condition="Obj == 0">empty</DisplayString>
103 <DisplayString Condition="(Obj != 0) &amp;&amp; (Obj-&gt;ref_cnt == 1)">RefPtr [1 ref] {*Obj}</DisplayString>
104 <DisplayString Condition="(Obj != 0) &amp;&amp; (Obj-&gt;ref_cnt != 1)">RefPtr [{Obj-&gt;ref_cnt} refs] {*Obj}</DisplayString>
105 <Expand>
106 <Item Condition="Obj != 0" Name="[refs]">Obj-&gt;ref_cnt</Item>
Stephen Hines36b56882014-04-23 16:57:46 -0700107 <ExpandedItem Condition="Obj != 0">Obj</ExpandedItem>
Aaron Ballman2fde57c2013-01-25 23:37:25 +0000108 </Expand>
109 </Type>
110
Aaron Ballman2fde57c2013-01-25 23:37:25 +0000111 <Type Name="llvm::SmallPtrSet&lt;*,*&gt;">
Stephen Hines36b56882014-04-23 16:57:46 -0700112 <DisplayString Condition="CurArray == SmallArray">{{ [Small Mode] size={NumElements}, capacity={CurArraySize} }}</DisplayString>
113 <DisplayString Condition="CurArray != SmallArray">{{ [Big Mode] size={NumElements}, capacity={CurArraySize} }}</DisplayString>
Aaron Ballman2fde57c2013-01-25 23:37:25 +0000114 <Expand>
Stephen Hines36b56882014-04-23 16:57:46 -0700115 <Item Name="[size]">NumElements</Item>
116 <Item Name="[capacity]">CurArraySize</Item>
117 <ArrayItems>
118 <Size>CurArraySize</Size>
119 <ValuePointer>($T1*)CurArray</ValuePointer>
120 </ArrayItems>
Aaron Ballman2fde57c2013-01-25 23:37:25 +0000121 </Expand>
122 </Type>
123
124 <Type Name="llvm::DenseMap&lt;*,*,*&gt;">
125 <DisplayString Condition="NumEntries == 0">empty</DisplayString>
Stephen Hines36b56882014-04-23 16:57:46 -0700126 <DisplayString Condition="NumEntries != 0">{{ size={NumEntries}, buckets={NumBuckets} }}</DisplayString>
Aaron Ballman2fde57c2013-01-25 23:37:25 +0000127 <Expand>
Stephen Hines36b56882014-04-23 16:57:46 -0700128 <Item Name="[size]">NumEntries</Item>
129 <Item Name="[buckets]">NumBuckets</Item>
Aaron Ballman2fde57c2013-01-25 23:37:25 +0000130 <ArrayItems>
131 <Size>NumBuckets</Size>
132 <ValuePointer>Buckets</ValuePointer>
133 </ArrayItems>
134 </Expand>
135 </Type>
136
137 <Type Name="llvm::StringMap&lt;*,*&gt;">
Stephen Hinescd81d942014-07-21 00:45:20 -0700138 <DisplayString>{{ size={NumItems}, buckets={NumBuckets} }}</DisplayString>
Aaron Ballman2fde57c2013-01-25 23:37:25 +0000139 <Expand>
Stephen Hinescd81d942014-07-21 00:45:20 -0700140 <Item Name="[size]">NumItems</Item>
Stephen Hines36b56882014-04-23 16:57:46 -0700141 <Item Name="[buckets]">NumBuckets</Item>
142 <ArrayItems>
Aaron Ballman2fde57c2013-01-25 23:37:25 +0000143 <Size>NumBuckets</Size>
Stephen Hines36b56882014-04-23 16:57:46 -0700144 <ValuePointer>(MapEntryTy**)TheTable</ValuePointer>
145 </ArrayItems>
Aaron Ballman2fde57c2013-01-25 23:37:25 +0000146 </Expand>
147 </Type>
148
149 <Type Name="llvm::StringMapEntry&lt;*&gt;">
150 <DisplayString Condition="StrLen == 0">empty</DisplayString>
Stephen Hines36b56882014-04-23 16:57:46 -0700151 <DisplayString Condition="StrLen != 0">({this+1,s}, {second})</DisplayString>
Aaron Ballman2fde57c2013-01-25 23:37:25 +0000152 <Expand>
Stephen Hines36b56882014-04-23 16:57:46 -0700153 <Item Name="[key]">this+1,s</Item>
Aaron Ballman2fde57c2013-01-25 23:37:25 +0000154 <Item Name="[value]" Condition="StrLen != 0">second</Item>
155 </Expand>
156 </Type>
157
158 <Type Name="llvm::Triple">
159 <DisplayString>{Data}</DisplayString>
160 </Type>
Stephen Hines36b56882014-04-23 16:57:46 -0700161
162 <Type Name="llvm::Optional&lt;*&gt;">
163 <DisplayString Condition="!hasVal">empty</DisplayString>
164 <DisplayString Condition="hasVal">{*(($T1 *)(unsigned char *)storage.buffer)}</DisplayString>
165 <Expand>
166 <Item Name="[underlying]" Condition="hasVal">*(($T1 *)(unsigned char *)storage.buffer)</Item>
167 </Expand>
168 </Type>
Aaron Ballman2fde57c2013-01-25 23:37:25 +0000169</AutoVisualizer>