blob: 8019b9cc16e3f4c42c2dbebf5c78ab9830dbcb3c [file] [log] [blame]
Douglas Gregor3ef1ad22011-07-27 05:22:46 +00001
2[Visualizer]
3
4llvm::SmallVector<*,*>{
5 preview (
Aaron Ballman46eb6ca2012-05-31 19:27:30 +00006 #if ((($T1*)$e.EndX - ($T1*)$e.BeginX) == 0) ( "empty" )
7 #else (
8 #(
9 "[",
10 ($T1*)$e.EndX - ($T1*)$e.BeginX,
11 "](",
12 #array(
13 expr: (($T1*)$e.BeginX)[$i],
14 size: ($T1*)$e.EndX - ($T1*)$e.BeginX
15 ),
16 ")"
17 )
Douglas Gregor3ef1ad22011-07-27 05:22:46 +000018 )
19 )
20
21 children (
22 #(
23 #([size] : ($T1*)$e.EndX - ($T1*)$e.BeginX),
24 #([capacity] : ($T1*)$e.CapacityX - ($T1*)$e.BeginX),
25 #array(
26 expr: (($T1*)$e.BeginX)[$i],
27 size: ($T1*)$e.EndX - ($T1*)$e.BeginX
28 )
29 )
30 )
31}
32
David Blaikie789acdd2012-04-19 17:26:49 +000033llvm::SmallVectorImpl<*>{
34 preview (
Aaron Ballman46eb6ca2012-05-31 19:27:30 +000035 #if ((($T1*)$e.EndX - ($T1*)$e.BeginX) == 0) ( "empty" )
36 #else (
37 #(
38 "[",
39 ($T1*)$e.EndX - ($T1*)$e.BeginX,
40 "](",
41 #array(
42 expr: (($T1*)$e.BeginX)[$i],
43 size: ($T1*)$e.EndX - ($T1*)$e.BeginX
44 ),
45 ")"
46 )
David Blaikie789acdd2012-04-19 17:26:49 +000047 )
48 )
49
50 children (
51 #(
52 #([size] : ($T1*)$e.EndX - ($T1*)$e.BeginX),
53 #([capacity] : ($T1*)$e.CapacityX - ($T1*)$e.BeginX),
54 #array(
55 expr: (($T1*)$e.BeginX)[$i],
56 size: ($T1*)$e.EndX - ($T1*)$e.BeginX
57 )
58 )
59 )
60}
61
David Blaikiec4968d62012-05-16 22:28:47 +000062llvm::SmallString<*>{
63 preview ([$e.BeginX,s])
64 stringview ([$e.BeginX,sb])
65}
66
Douglas Gregor3ef1ad22011-07-27 05:22:46 +000067llvm::StringRef{
68 preview ([$e.Data,s])
69 stringview ([$e.Data,sb])
70
71 children (
72 #(
73 #([size] : $e.Length),
74 #array(expr: $e.Data[$i], size: $e.Length)
75 )
76 )
77}
78
79clang::Token{
80 preview((clang::tok::TokenKind)(int)$e.Kind)
Aaron Ballmanfd8fed92012-02-06 20:47:31 +000081}
82
Aaron Ballmanb017ea22012-03-10 22:28:45 +000083llvm::PointerIntPair<*,*,*,*>{
Aaron Ballmanfd8fed92012-02-06 20:47:31 +000084 preview (
85 #(
Aaron Ballmanb017ea22012-03-10 22:28:45 +000086 ($T1*)($e.Value & $e.PointerBitMask),
Aaron Ballmanfd8fed92012-02-06 20:47:31 +000087 " [",
Aaron Ballmanb017ea22012-03-10 22:28:45 +000088 ($T3)(($e.Value >> $e.IntShift) & $e.IntMask),
Aaron Ballmanfd8fed92012-02-06 20:47:31 +000089 "]"
90 )
91 )
92
93 children (
94 #(
Aaron Ballman46eb6ca2012-05-31 19:27:30 +000095 #([raw members] : [$e,!]),
Aaron Ballmanb017ea22012-03-10 22:28:45 +000096 #([ptr] : ($T1*)($e.Value & $e.PointerBitMask)),
97 #([int] : ($T3)($e.Value >> $e.IntShift) & $e.IntMask)
Aaron Ballmanfd8fed92012-02-06 20:47:31 +000098 )
99 )
100}
101
Aaron Ballmanb017ea22012-03-10 22:28:45 +0000102llvm::PointerUnion<*,*>{
Aaron Ballmanfd8fed92012-02-06 20:47:31 +0000103 preview (
Aaron Ballman46eb6ca2012-05-31 19:27:30 +0000104 #if ((($e.Val.Value >> $e.Val.IntShift) & $e.Val.IntMask) == 0) ( "PT1" )
105 #else ( "PT2" )
Aaron Ballmanfd8fed92012-02-06 20:47:31 +0000106 )
107
108 children (
109 #(
Aaron Ballman46eb6ca2012-05-31 19:27:30 +0000110 #([raw members] : [$e,!]),
Aaron Ballmanfd8fed92012-02-06 20:47:31 +0000111 #if ((($e.Val.Value >> $e.Val.IntShift) & $e.Val.IntMask) == 0) (
112 #([ptr] : ($T1)($e.Val.Value & $e.Val.PointerBitMask))
Aaron Ballman46eb6ca2012-05-31 19:27:30 +0000113 ) #else (
Aaron Ballmanfd8fed92012-02-06 20:47:31 +0000114 #([ptr] : ($T2)($e.Val.Value & $e.Val.PointerBitMask))
115 )
116 )
117 )
118}
119
Aaron Ballmanb017ea22012-03-10 22:28:45 +0000120llvm::PointerUnion3<*,*,*>{
Aaron Ballmanfd8fed92012-02-06 20:47:31 +0000121 preview (
Aaron Ballman46eb6ca2012-05-31 19:27:30 +0000122 #if (($e.Val.Val.Value & 0x2) == 2) ( "PT2" )
123 #elif (($e.Val.Val.Value & 0x1) == 1) ( "PT3" )
124 #else ( "PT1" )
Aaron Ballmanfd8fed92012-02-06 20:47:31 +0000125 )
126
127 children (
128 #(
129 #if (($e.Val.Val.Value & 0x2) == 2) (
130 #([ptr] : ($T2)(($e.Val.Val.Value >> 2) << 2))
131 ) #elif (($e.Val.Val.Value & 0x1) == 1) (
132 #([ptr] : ($T3)(($e.Val.Val.Value >> 2) << 2))
133 ) #else (
134 #([ptr] : ($T1)(($e.Val.Val.Value >> 2) << 2))
135 )
136 )
137 )
138}
139
Aaron Ballmanb017ea22012-03-10 22:28:45 +0000140llvm::PointerUnion4<*,*,*,*>{
Aaron Ballmanfd8fed92012-02-06 20:47:31 +0000141 preview (
Aaron Ballman46eb6ca2012-05-31 19:27:30 +0000142 #if (($e.Val.Val.Value & 0x3) == 3) ( "PT4" )
143 #elif (($e.Val.Val.Value & 0x2) == 2) ( "PT2" )
144 #elif (($e.Val.Val.Value & 0x1) == 1) ( "PT3" )
145 #else ( "PT1" )
Aaron Ballmanfd8fed92012-02-06 20:47:31 +0000146 )
147
148 children (
149 #(
150 #if (($e.Val.Val.Value & 0x3) == 3) (
151 #([ptr] : ($T4)(($e.Val.Val.Value >> 2) << 2))
Aaron Ballman46eb6ca2012-05-31 19:27:30 +0000152 ) #elif (($e.Val.Val.Value & 0x2) == 2) (
Aaron Ballmanfd8fed92012-02-06 20:47:31 +0000153 #([ptr] : ($T2)(($e.Val.Val.Value >> 2) << 2))
154 ) #elif (($e.Val.Val.Value & 0x1) == 1) (
155 #([ptr] : ($T3)(($e.Val.Val.Value >> 2) << 2))
156 ) #else (
157 #([ptr] : ($T1)(($e.Val.Val.Value >> 2) << 2))
158 )
159 )
160 )
161}
Aaron Ballman46eb6ca2012-05-31 19:27:30 +0000162
163llvm::IntrusiveRefCntPtr<*>{
164 preview (
165 #if ($e.Obj == 0) ( "empty" )
166 #else (
167 #(
168 "[RefCnt=", $e.Obj->ref_cnt,
169 ", ",
170 "Obj=", $e.Obj,
171 "]"
172 )
173 )
174 )
175
176 children (
177 #if ($e.Obj == 0) ( #array(expr: 0, size: 0) )
178 #else (
179 #(
180 #(RefCnt : $e.Obj->ref_cnt),
181 #(Obj : $e.Obj)
182 )
183 )
184 )
185}
186
187llvm::OwningPtr<*>{
188 preview (
189 #if ($e.Ptr == 0) ( "empty" )
190 #else ( $e.Ptr )
191 )
192
193 children (
194 #if ($e.Ptr == 0) ( #array(expr: 0, size: 0) )
195 #else ( #(Ptr : $e.Ptr) )
196 )
197}
198
199llvm::SmallPtrSet<*,*>{
200 preview (
201 #(
202 #if (($e.CurArray) == ($e.SmallArray)) ( "[Small Mode] " )
203 #else ( "[Big Mode] " ),
204 "NumElements=", $e.NumElements,
205 " CurArraySize=", $e.CurArraySize
206 )
207 )
208
209 children (
210 #(
211 #([raw members] : [$c,!]),
212 #(NumElements : $e.NumElements),
213 #(CurArraySize : $e.CurArraySize),
214 #array(
215 expr: $e.CurArray[$i],
216 size: $e.CurArraySize + 1
217 ) : ($T1*)&$e
218 )
219 )
220}
221
222llvm::DenseMap<*,*,*>{
223 preview (
224 #if ($e.NumEntries == 0) ( "empty" )
225 #else (
226 #(
227 "[NumEntries=", $e.NumEntries,
228 " NumBuckets=", $e.NumBuckets,
229 "]"
230 )
231 )
232 )
233
234 children (
235 #if ($e.NumEntries == 0) ( #array(expr: 0, size: 0) )
236 #else (
237 #(
238 #([raw members] : [$c,!]),
239 #(NumEntries : $e.NumEntries),
240 #(NumBuckets : $e.NumBuckets),
241 #array(
242 expr: $e.Buckets[$i],
243 size: $e.NumBuckets
244 )
245 )
246 )
247 )
248}
249
250llvm::StringMap<*,*>{
251 preview (
252 #(
253 "[NumBuckets=", $e.NumBuckets,
254 " ItemSize=", $e.ItemSize,
255 "]"
256 )
257 )
258
259 children (
260 #(
261 #([raw members] : [$c,!]),
262 #(NumBuckets : $e.NumBuckets),
263 #(ItemSize : $e.ItemSize),
264 #array(
265 expr: $e.TheTable[$i],
266 size: $e.NumBuckets,
267 ) : (llvm::StringMapEntry<$T1>*)&$e
268 )
269 )
270}
271
272llvm::StringMapEntry<*>{
273 preview (
274 #if ($e.StrLen == 0) ( "empty" )
275 #else ( #(Entry : $e.second) )
276 )
277
278 children (
279 #if ($e.StrLen == 0) ( "empty" )
280 #else ( #(Entry : $e.second) )
281 )
282}
283
284clang::DirectoryEntry|clang::FileEntry|clang::PragmaHandler{
285 preview ( [$e.Name,s] )
286 children (
287 #(
288 #([raw members] : [$c,!]),
289 #(Name : [$e.Name,s])
290 )
291 )
292}
293
294clang::DeclarationName{
295 preview (
296 ; enum values from clang::DeclarationName::StoredNameKind
297 #if ($e.Ptr == 0) (
298 "empty"
299 ) #elif (($e.Ptr & $e.PtrMask) == $e.StoredIdentifier) (
300 #else ( #("Identifier, ", (clang::IdentifierInfo*)($e.Ptr & ~$e.PtrMask)) )
301 ) #elif (($e.Ptr & $e.PtrMask) == $e.StoredObjCZeroArgSelector) (
302 #("ZeroArgSelector, ", (clang::IdentifierInfo*)($e.Ptr & ~$e.PtrMask))
303 ) #elif (($e.Ptr & $e.PtrMask) == $e.StoredObjCOneArgSelector) (
304 #("OneArgSelector, ", (clang::IdentifierInfo*)($e.Ptr & ~$e.PtrMask))
305 ) #elif (($e.Ptr & $e.PtrMask) == $e.StoredDeclarationNameExtra) (
306 #switch (((clang::DeclarationNameExtra*)($e.Ptr & ~$e.PtrMask)).ExtraKindOrNumArgs)
307 #case 0 ( ;DeclarationNameExtra::CXXConstructor
308 #("CXXConstructorName, ", (clang::CXXSpecialName*)($e.Ptr & ~$e.PtrMask))
309 )
310 #case 1 ( ;DeclarationNameExtra::CXXDestructor
311 #("CXXDestructorName, ", (clang::CXXSpecialName*)($e.Ptr & ~$e.PtrMask))
312 )
313 #case 2 ( ;DeclarationNameExtra::CXXConversionFunction
314 #("CXXConversionFunctionName, ", (clang::CXXSpecialName*)($e.Ptr & ~$e.PtrMask))
315 )
316 #case 46 ( ;DeclarationNameExtra::CXXLiteralOperator
317 #("CXXLiteralOperatorName, ", (clang::CXXLiteralOperatorIdName*)($e.Ptr & ~$e.PtrMask))
318 )
319 #case 47 ( ;DeclarationNameExtra::CXXUsingDirective
320 #("CXXUsingDirective") ;TODO What to add here?
321 )
322 #default (
323 #if (((clang::DeclarationNameExtra*)($e.Ptr & ~$e.PtrMask)).ExtraKindOrNumArgs < 47) (
324 #("CXXOperatorName, ", (clang::CXXOperatorIdName*)($e.Ptr & ~$e.PtrMask))
325 ) #else (
326 #("ObjCMultiArgSelector, ", (clang::MultiKeywordSelector*)($e.Ptr & ~$e.PtrMask))
327 )
328 )
329 )
330 )
331
332 children (
333 #(
334 ; enum values from clang::DeclarationName::StoredNameKind
335 #if ($e.Ptr == 0) (
336 #array( expr: 0, size: 0 )
337 ) #else (
338 #(
339 #([raw members] : [$e.Ptr,!]),
340 if (($e.Ptr & $e.PtrMask) == $e.StoredIdentifier) (
341 #(Ptr : (clang::IdentifierInfo*)($e.Ptr & ~$e.PtrMask))
342 ) #elif (($e.Ptr & $e.PtrMask) == $e.StoredObjCZeroArgSelector) (
343 #(Ptr : (clang::IdentifierInfo*)($e.Ptr & ~$e.PtrMask))
344 ) #elif (($e.Ptr & $e.PtrMask) == $e.StoredObjCOneArgSelector) (
345 #(Ptr : (clang::IdentifierInfo*)($e.Ptr & ~$e.PtrMask))
346 ) #elif (($e.Ptr & $e.PtrMask) == $e.StoredDeclarationNameExtra) (
347 #switch (((clang::DeclarationNameExtra*)($e.Ptr & ~$e.PtrMask)).ExtraKindOrNumArgs)
348 #case 0 ( ;DeclarationNameExtra::CXXConstructor
349 #(Ptr : (clang::CXXSpecialName*)($e.Ptr & ~$e.PtrMask))
350 )
351 #case 1 ( ;DeclarationNameExtra::CXXDestructor
352 #(Ptr : (clang::CXXSpecialName*)($e.Ptr & ~$e.PtrMask))
353 )
354 #case 2 ( ;DeclarationNameExtra::CXXConversionFunction
355 #(Ptr : (clang::CXXSpecialName*)($e.Ptr & ~$e.PtrMask))
356 )
357 #case 46 ( ;DeclarationNameExtra::CXXLiteralOperator
358 #(Ptr : (clang::CXXLiteralOperatorIdName*)($e.Ptr & ~$e.PtrMask))
359 )
360 #case 47 ( ;DeclarationNameExtra::CXXUsingDirective
361 #(Ptr : $e.Ptr) ;TODO What to add here?
362 )
363 #default (
364 #if (((clang::DeclarationNameExtra*)($e.Ptr & ~$e.PtrMask)).ExtraKindOrNumArgs < 47) (
365 #(Ptr : (CXXOperatorIdName*)($e.Ptr & ~$e.PtrMask))
366 ) #else (
367 #(Ptr : (clang::MultiKeywordSelector*)($e.Ptr & ~$e.PtrMask))
368 )
369 )
370 )
371 )
372 )
373 )
374 )
375}
376
377clang::DeclSpec{
378 preview (
379 #(
380 "[",
381 (clang::DeclSpec::SCS)$e.StorageClassSpec,
382 ", ",
383 (clang::TypeSpecifierType)$e.TypeSpecType,
384 "]"
385 )
386 )
387}
388
389llvm::Triple{
390 preview ( $e.Data )
391}