Reduce abuse of default values in the GlobalAlias constructor.
[oota-llvm.git] / utils / llvm.natvis
1 <?xml version="1.0" encoding="utf-8"?>\r
2 <!--\r
3 Visual Studio 2012 Native Debugging Visualizers for LLVM\r
4 \r
5 Put this file into "%USERPROFILE%\Documents\Visual Studio 2012\Visualizers"\r
6 or create a symbolic link so it updates automatically.\r
7 -->\r
8 <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">\r
9 \r
10   <Type Name="llvm::SmallVectorImpl&lt;*&gt;">\r
11     <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) == 0">empty</DisplayString>\r
12     <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) != 0">{{ size={($T1*)EndX - ($T1*)BeginX} }}</DisplayString>\r
13     <Expand>\r
14       <Item Name="[size]">($T1*)EndX - ($T1*)BeginX</Item>\r
15       <Item Name="[capacity]">($T1*)CapacityX - ($T1*)BeginX</Item>\r
16       <ArrayItems>\r
17         <Size>($T1*)EndX - ($T1*)BeginX</Size>\r
18         <ValuePointer>($T1*)BeginX</ValuePointer>\r
19       </ArrayItems>\r
20     </Expand>\r
21   </Type>\r
22 \r
23   <Type Name="llvm::SmallString&lt;*&gt;">\r
24     <DisplayString>{BeginX,s}</DisplayString>\r
25     <StringView>BeginX,s</StringView>\r
26     <Expand>\r
27       <Item Name="[size]">(char*)EndX - (char*)BeginX</Item>\r
28       <Item Name="[capacity]">(char*)CapacityX - (char*)BeginX</Item>\r
29       <ArrayItems>\r
30         <Size>(char*)EndX - (char*)BeginX</Size>\r
31         <ValuePointer>(char*)BeginX</ValuePointer>\r
32       </ArrayItems>\r
33     </Expand>\r
34   </Type>\r
35 \r
36   <Type Name="llvm::StringRef">\r
37     <DisplayString>{Data,[Length]s}</DisplayString>\r
38     <StringView>Data,[Length]s</StringView>\r
39     <Expand>\r
40       <Item Name="[size]">Length</Item>\r
41       <ArrayItems>\r
42         <Size>Length</Size>\r
43         <ValuePointer>Data</ValuePointer>\r
44       </ArrayItems>\r
45     </Expand>\r
46   </Type>\r
47 \r
48   <Type Name="llvm::PointerIntPair&lt;*,*,*,*&gt;">\r
49     <DisplayString>{(void*)(Value &amp; PointerBitMask)} [{($T3)((Value &gt;&gt; IntShift) &amp; IntMask)}]</DisplayString>\r
50     <Expand>\r
51       <Item Name="[ptr]">($T1*)(Value &amp; PointerBitMask)</Item>\r
52       <Item Name="[int]">($T3)((Value &gt;&gt; IntShift) &amp; IntMask)</Item>\r
53     </Expand>\r
54   </Type>\r
55 \r
56   <Type Name="llvm::PointerUnion&lt;*,*&gt;">\r
57     <DisplayString Condition="((Val.Value &gt;&gt; Val.IntShift) &amp; Val.IntMask) == 0">{"$T1", s8b} {(void*)(Val.Value &amp; Val.PointerBitMask)}</DisplayString>\r
58     <DisplayString Condition="((Val.Value &gt;&gt; Val.IntShift) &amp; Val.IntMask) != 0">{"$T2", s8b} {(void*)(Val.Value &amp; Val.PointerBitMask)}</DisplayString>\r
59     <Expand>\r
60       <ExpandedItem Condition="((Val.Value &gt;&gt; Val.IntShift) &amp; Val.IntMask) == 0">($T1)(Val.Value &amp; Val.PointerBitMask)</ExpandedItem>\r
61       <ExpandedItem Condition="((Val.Value &gt;&gt; Val.IntShift) &amp; Val.IntMask) != 0">($T2)(Val.Value &amp; Val.PointerBitMask)</ExpandedItem>\r
62     </Expand>\r
63   </Type>\r
64 \r
65   <Type Name="llvm::PointerUnion3&lt;*,*,*&gt;">\r
66     <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>\r
67     <DisplayString Condition="(Val.Val.Value &amp; 2) == 2">{"$T2", s8b} {(void*)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>\r
68     <DisplayString Condition="(Val.Val.Value &amp; 1) == 1">{"$T3", s8b} {(void*)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>\r
69     <Expand>\r
70       <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>\r
71       <ExpandedItem Condition="(Val.Val.Value &amp; 2) == 2">($T2)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)</ExpandedItem>\r
72       <ExpandedItem Condition="(Val.Val.Value &amp; 1) == 1">($T3)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)</ExpandedItem>\r
73     </Expand>\r
74   </Type>\r
75 \r
76   <Type Name="llvm::PointerUnion4&lt;*,*,*,*&gt;">\r
77     <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>\r
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>\r
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>\r
80     <DisplayString Condition="(Val.Val.Value &amp; 3) == 3">{"$T4", s8b} {(void*)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>\r
81     <Expand>\r
82       <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>\r
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>\r
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>\r
85       <ExpandedItem Condition="(Val.Val.Value &amp; 3) == 3">($T4)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)</ExpandedItem>\r
86     </Expand>\r
87   </Type>\r
88 \r
89   <Type Name="llvm::iplist&lt;*,*&gt;">\r
90     <DisplayString Condition="Head == 0">{{ empty }}</DisplayString>\r
91     <DisplayString Condition="Head != 0">{{ head={Head} }}</DisplayString>\r
92     <Expand>\r
93       <LinkedListItems>\r
94         <HeadPointer>Head</HeadPointer>\r
95         <NextPointer>Next</NextPointer>\r
96         <ValueNode>this</ValueNode>\r
97       </LinkedListItems>\r
98     </Expand>\r
99   </Type>\r
100 \r
101   <Type Name="llvm::IntrusiveRefCntPtr&lt;*&gt;">\r
102     <DisplayString Condition="Obj == 0">empty</DisplayString>\r
103     <DisplayString Condition="(Obj != 0) &amp;&amp; (Obj-&gt;ref_cnt == 1)">RefPtr [1 ref] {*Obj}</DisplayString>\r
104     <DisplayString Condition="(Obj != 0) &amp;&amp; (Obj-&gt;ref_cnt != 1)">RefPtr [{Obj-&gt;ref_cnt} refs] {*Obj}</DisplayString>\r
105     <Expand>\r
106       <Item Condition="Obj != 0" Name="[refs]">Obj-&gt;ref_cnt</Item>\r
107       <ExpandedItem Condition="Obj != 0">Obj</ExpandedItem>\r
108     </Expand>\r
109   </Type>\r
110 \r
111   <Type Name="llvm::OwningPtr&lt;*&gt;">\r
112     <DisplayString Condition="Ptr == 0">empty</DisplayString>\r
113     <DisplayString Condition="Ptr != 0">OwningPtr {*Ptr}</DisplayString>\r
114     <Expand>\r
115       <ExpandedItem Condition="Ptr != 0">Ptr</ExpandedItem>\r
116     </Expand>\r
117   </Type>\r
118 \r
119   <Type Name="llvm::SmallPtrSet&lt;*,*&gt;">\r
120     <DisplayString Condition="CurArray == SmallArray">{{ [Small Mode] size={NumElements}, capacity={CurArraySize} }}</DisplayString>\r
121     <DisplayString Condition="CurArray != SmallArray">{{ [Big Mode] size={NumElements}, capacity={CurArraySize} }}</DisplayString>\r
122     <Expand>\r
123       <Item Name="[size]">NumElements</Item>\r
124       <Item Name="[capacity]">CurArraySize</Item>\r
125       <ArrayItems>\r
126         <Size>CurArraySize</Size>\r
127         <ValuePointer>($T1*)CurArray</ValuePointer>\r
128       </ArrayItems>\r
129     </Expand>\r
130   </Type>\r
131 \r
132   <Type Name="llvm::DenseMap&lt;*,*,*&gt;">\r
133     <DisplayString Condition="NumEntries == 0">empty</DisplayString>\r
134     <DisplayString Condition="NumEntries != 0">{{ size={NumEntries}, buckets={NumBuckets} }}</DisplayString>\r
135     <Expand>\r
136       <Item Name="[size]">NumEntries</Item>\r
137       <Item Name="[buckets]">NumBuckets</Item>\r
138       <ArrayItems>\r
139         <Size>NumBuckets</Size>\r
140         <ValuePointer>Buckets</ValuePointer>\r
141       </ArrayItems>\r
142     </Expand>\r
143   </Type>\r
144 \r
145   <Type Name="llvm::StringMap&lt;*,*&gt;">\r
146     <DisplayString>{{ size={ItemSize}, buckets={NumBuckets} }}</DisplayString>\r
147     <Expand>\r
148       <Item Name="[size]">ItemSize</Item>\r
149       <Item Name="[buckets]">NumBuckets</Item>\r
150       <ArrayItems>\r
151         <Size>NumBuckets</Size>\r
152         <ValuePointer>(MapEntryTy**)TheTable</ValuePointer>\r
153       </ArrayItems>\r
154     </Expand>\r
155   </Type>\r
156 \r
157   <Type Name="llvm::StringMapEntry&lt;*&gt;">\r
158     <DisplayString Condition="StrLen == 0">empty</DisplayString>\r
159     <DisplayString Condition="StrLen != 0">({this+1,s}, {second})</DisplayString>\r
160     <Expand>\r
161       <Item Name="[key]">this+1,s</Item>\r
162       <Item Name="[value]" Condition="StrLen != 0">second</Item>\r
163     </Expand>\r
164   </Type>\r
165 \r
166   <Type Name="llvm::Triple">\r
167     <DisplayString>{Data}</DisplayString>\r
168   </Type>\r
169   \r
170   <Type Name="llvm::Optional&lt;*&gt;">\r
171     <DisplayString Condition="!hasVal">empty</DisplayString>\r
172     <DisplayString Condition="hasVal">{*(($T1 *)(unsigned char *)storage.buffer)}</DisplayString>\r
173     <Expand>\r
174       <Item Name="[underlying]" Condition="hasVal">*(($T1 *)(unsigned char *)storage.buffer)</Item>\r
175     </Expand>\r
176   </Type>\r
177 </AutoVisualizer>\r