aboutsummaryrefslogtreecommitdiffstats
path: root/utils/llvm.natvis
blob: 6b4ef83c67e2acdea6d2f62c29859d560d237e60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<?xml version="1.0" encoding="utf-8"?>
<!--
Visual Studio 2012 Native Debugging Visualizers for LLVM

Put this file into "%USERPROFILE%\Documents\Visual Studio 2012\Visualizers"
or create a symbolic link so it updates automatically.
-->
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
  <Type Name="llvm::SmallVector&lt;*,*&gt;">
    <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) == 0">empty</DisplayString>
    <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) != 0">{{ size={($T1*)EndX - ($T1*)BeginX} }}</DisplayString>
    <Expand>
      <Item Name="[size]">($T1*)EndX - ($T1*)BeginX</Item>
      <Item Name="[capacity]">($T1*)CapacityX - ($T1*)BeginX</Item>
      <ArrayItems>
        <Size>($T1*)EndX - ($T1*)BeginX</Size>
        <ValuePointer>($T1*)BeginX</ValuePointer>
      </ArrayItems>
    </Expand>
  </Type>

  <Type Name="llvm::SmallVectorImpl&lt;*&gt;">
    <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) == 0">empty</DisplayString>
    <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) != 0">[{($T1*)EndX - ($T1*)BeginX}]</DisplayString>
    <Expand>
      <Item Name="[size]">($T1*)EndX - ($T1*)BeginX</Item>
      <Item Name="[capacity]">($T1*)CapacityX - ($T1*)BeginX</Item>
      <ArrayItems>
        <Size>($T1*)EndX - ($T1*)BeginX</Size>
        <ValuePointer>($T1*)BeginX</ValuePointer>
      </ArrayItems>
    </Expand>
  </Type>

  <Type Name="llvm::SmallString&lt;*&gt;">
    <DisplayString>{BeginX,s}</DisplayString>
    <StringView>BeginX,s</StringView>
    <Expand>
      <Item Name="[size]">(char*)EndX - (char*)BeginX</Item>
      <Item Name="[capacity]">(char*)CapacityX - (char*)BeginX</Item>
      <ArrayItems>
        <Size>(char*)EndX - (char*)BeginX</Size>
        <ValuePointer>(char*)BeginX</ValuePointer>
      </ArrayItems>
    </Expand>
  </Type>

  <Type Name="llvm::StringRef">
    <DisplayString>[{Length}] {Data,s}</DisplayString>
    <StringView>Data,s</StringView>
    <Expand>
      <Item Name="[length]">Length</Item>
      <ArrayItems>
        <Size>Length</Size>
        <ValuePointer>Data</ValuePointer>
      </ArrayItems>
    </Expand>
  </Type>

  <Type Name="llvm::PointerIntPair&lt;*,*,*,*&gt;">
    <DisplayString>{Value &amp; PointerBitMask} [{(Value &gt;&gt; IntShift) &amp; IntMask}]</DisplayString>
    <Expand>
      <Item Name="[ptr]">Value &amp; PointerBitMask</Item>
      <Item Name="[int]">(Value &gt;&gt; IntShift) &amp; IntMask</Item>
    </Expand>
  </Type>

  <Type Name="llvm::PointerUnion&lt;*,*&gt;">
    <DisplayString Condition="((Val.Value &gt;&gt; Val.IntShift) &amp; Val.IntMask) == 0">[P1] {($T1)(Val.Value &amp; Val.PointerBitMask)}</DisplayString>
    <DisplayString Condition="((Val.Value &gt;&gt; Val.IntShift) &amp; Val.IntMask) != 0">[P2] {($T2)(Val.Value &amp; Val.PointerBitMask)}</DisplayString>
    <Expand>
      <Item Name="[ptr]" Condition="((Val.Value &gt;&gt; Val.IntShift) &amp; Val.IntMask) == 0">($T1)(Val.Value &amp; Val.PointerBitMask)</Item>
      <Item Name="[ptr]" Condition="((Val.Value &gt;&gt; Val.IntShift) &amp; Val.IntMask) != 0">($T2)(Val.Value &amp; Val.PointerBitMask)</Item>
    </Expand>
  </Type>

  <Type Name="llvm::PointerUnion3&lt;*,*,*&gt;">
    <DisplayString Condition="(Val.Val.Value &amp; 2) != 2 &amp;&amp; (Val.Val.Value &amp; 1) != 1">[P1] {($T1)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>
    <DisplayString Condition="(Val.Val.Value &amp; 2) == 2">[P2] {($T2)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>
    <DisplayString Condition="(Val.Val.Value &amp; 1) == 1">[P3] {($T3)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>
    <Expand>
      <Item Name="[ptr]" 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)</Item>
      <Item Name="[ptr]" Condition="(Val.Val.Value &amp; 2) == 2">($T2)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)</Item>
      <Item Name="[ptr]" Condition="(Val.Val.Value &amp; 1) == 1">($T3)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)</Item>
    </Expand>
  </Type>

  <Type Name="llvm::PointerUnion4&lt;*,*,*,*&gt;">
    <DisplayString Condition="(Val.Val.Value &amp; 3) != 3 &amp;&amp; (Val.Val.Value &amp; 2) != 2 &amp;&amp; (Val.Val.Value &amp; 1) != 1">[P1] {($T1)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>
    <DisplayString Condition="(Val.Val.Value &amp; 3) != 3 &amp;&amp; (Val.Val.Value &amp; 2) == 2">[P2] {($T2)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>
    <DisplayString Condition="(Val.Val.Value &amp; 3) != 3 &amp;&amp; (Val.Val.Value &amp; 1) == 1">[P3] {($T3)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>
    <DisplayString Condition="(Val.Val.Value &amp; 3) == 3">[P4] {($T4)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)}</DisplayString>
    <Expand>
      <Item Name="[ptr]" 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)</Item>
      <Item Name="[ptr]" 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)</Item>
      <Item Name="[ptr]" 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)</Item>
      <Item Name="[ptr]" Condition="(Val.Val.Value &amp; 3) == 3">($T4)((Val.Val.Value &gt;&gt; 2) &lt;&lt; 2)</Item>
    </Expand>
  </Type>

  <Type Name="llvm::iplist&lt;*,*&gt;">
    <DisplayString Condition="Head == 0">{{ empty }}</DisplayString>
    <DisplayString Condition="Head != 0">{{ head={Head} }}</DisplayString>
    <Expand>
      <LinkedListItems>
        <HeadPointer>Head</HeadPointer>
        <NextPointer>Next</NextPointer>
        <ValueNode>this</ValueNode>
      </LinkedListItems>
    </Expand>
  </Type>

  <Type Name="llvm::IntrusiveRefCntPtr&lt;*&gt;">
    <DisplayString Condition="Obj == 0">empty</DisplayString>
    <DisplayString Condition="(Obj != 0) &amp;&amp; (Obj-&gt;ref_cnt == 1)">RefPtr [1 ref] {*Obj}</DisplayString>
    <DisplayString Condition="(Obj != 0) &amp;&amp; (Obj-&gt;ref_cnt != 1)">RefPtr [{Obj-&gt;ref_cnt} refs] {*Obj}</DisplayString>
    <Expand>
      <Item Condition="Obj != 0" Name="[refs]">Obj-&gt;ref_cnt</Item>
      <Item Condition="Obj != 0" Name="[ptr]">Obj</Item>
    </Expand>
  </Type>

  <Type Name="llvm::OwningPtr&lt;*&gt;">
    <DisplayString Condition="Ptr == 0">empty</DisplayString>
    <DisplayString Condition="Ptr != 0">OwningPtr {*Ptr}</DisplayString>
    <Expand>
      <Item Condition="Ptr != 0" Name="[ptr]">Ptr</Item>
    </Expand>
  </Type>

  <Type Name="llvm::SmallPtrSet&lt;*,*&gt;">
    <DisplayString Condition="CurArray == SmallArray">{{ [Small Mode] elements={NumElements}, arraySize={CurArraySize} }}</DisplayString>
    <DisplayString Condition="CurArray != SmallArray">{{ [Big Mode] elements={NumElements}, arraySize={CurArraySize} }}</DisplayString>
    <Expand>
      <Item Name="[NumElements]">NumElements</Item>
      <Item Name="[CurArraySize]">CurArraySize</Item>
      <IndexListItems>
        <Size>CurArraySize + 1</Size>
        <ValueNode>($T1*)&amp;CurArray[$i]</ValueNode>
      </IndexListItems>
    </Expand>
  </Type>

  <Type Name="llvm::DenseMap&lt;*,*,*&gt;">
    <DisplayString Condition="NumEntries == 0">empty</DisplayString>
    <DisplayString Condition="NumEntries != 0">{{ entries={NumEntries}, buckets={NumBuckets} }}</DisplayString>
    <Expand>
      <Item Name="[NumEntries]">NumEntries</Item>
      <Item Name="[NumBuckets]">NumBuckets</Item>
      <ArrayItems>
        <Size>NumBuckets</Size>
        <ValuePointer>Buckets</ValuePointer>
      </ArrayItems>
    </Expand>
  </Type>

  <Type Name="llvm::StringMap&lt;*,*&gt;">
    <DisplayString>{{ NumBuckets={NumBuckets}, ItemSize={ItemSize} }}</DisplayString>
    <Expand>
      <Item Name="[NumBuckets]">NumBuckets</Item>
      <Item Name="[ItemSize]">ItemSize</Item>
      <IndexListItems>
        <Size>NumBuckets</Size>
        <ValueNode>(llvm::StringMapEntry&lt;$T1&gt;*)TheTable[$i]</ValueNode>
      </IndexListItems>
    </Expand>
  </Type>

  <Type Name="llvm::StringMapEntry&lt;*&gt;">
    <DisplayString Condition="StrLen == 0">empty</DisplayString>
    <DisplayString Condition="StrLen != 0">({((llvm::StringMapEntry&lt;$T1&gt;*)this)+1,s}, {second})</DisplayString>
    <Expand>
      <Item Name="[key]">((llvm::StringMapEntry&lt;$T1&gt;*)this)+1,s</Item>
      <Item Name="[value]" Condition="StrLen != 0">second</Item>
    </Expand>
  </Type>

  <Type Name="llvm::Triple">
    <DisplayString>{Data}</DisplayString>
  </Type>
</AutoVisualizer>