DebugInfo: Remove DIScope
[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::SmallPtrSet&lt;*,*&gt;">\r
112     <DisplayString Condition="CurArray == SmallArray">{{ [Small Mode] size={NumElements}, capacity={CurArraySize} }}</DisplayString>\r
113     <DisplayString Condition="CurArray != SmallArray">{{ [Big Mode] size={NumElements}, capacity={CurArraySize} }}</DisplayString>\r
114     <Expand>\r
115       <Item Name="[size]">NumElements</Item>\r
116       <Item Name="[capacity]">CurArraySize</Item>\r
117       <ArrayItems>\r
118         <Size>CurArraySize</Size>\r
119         <ValuePointer>($T1*)CurArray</ValuePointer>\r
120       </ArrayItems>\r
121     </Expand>\r
122   </Type>\r
123 \r
124   <Type Name="llvm::DenseMap&lt;*,*,*&gt;">\r
125     <DisplayString Condition="NumEntries == 0">empty</DisplayString>\r
126     <DisplayString Condition="NumEntries != 0">{{ size={NumEntries}, buckets={NumBuckets} }}</DisplayString>\r
127     <Expand>\r
128       <Item Name="[size]">NumEntries</Item>\r
129       <Item Name="[buckets]">NumBuckets</Item>\r
130       <ArrayItems>\r
131         <Size>NumBuckets</Size>\r
132         <ValuePointer>Buckets</ValuePointer>\r
133       </ArrayItems>\r
134     </Expand>\r
135   </Type>\r
136 \r
137   <Type Name="llvm::StringMap&lt;*,*&gt;">\r
138     <DisplayString>{{ size={NumItems}, buckets={NumBuckets} }}</DisplayString>\r
139     <Expand>\r
140       <Item Name="[size]">NumItems</Item>\r
141       <Item Name="[buckets]">NumBuckets</Item>\r
142       <ArrayItems>\r
143         <Size>NumBuckets</Size>\r
144         <ValuePointer>(MapEntryTy**)TheTable</ValuePointer>\r
145       </ArrayItems>\r
146     </Expand>\r
147   </Type>\r
148 \r
149   <Type Name="llvm::StringMapEntry&lt;*&gt;">\r
150     <DisplayString Condition="StrLen == 0">empty</DisplayString>\r
151     <DisplayString Condition="StrLen != 0">({this+1,s}, {second})</DisplayString>\r
152     <Expand>\r
153       <Item Name="[key]">this+1,s</Item>\r
154       <Item Name="[value]" Condition="StrLen != 0">second</Item>\r
155     </Expand>\r
156   </Type>\r
157 \r
158   <Type Name="llvm::Triple">\r
159     <DisplayString>{Data}</DisplayString>\r
160   </Type>\r
161   \r
162   <Type Name="llvm::Optional&lt;*&gt;">\r
163     <DisplayString Condition="!hasVal">empty</DisplayString>\r
164     <DisplayString Condition="hasVal">{*(($T1 *)(unsigned char *)storage.buffer)}</DisplayString>\r
165     <Expand>\r
166       <Item Name="[underlying]" Condition="hasVal">*(($T1 *)(unsigned char *)storage.buffer)</Item>\r
167     </Expand>\r
168   </Type>\r
169 </AutoVisualizer>\r