Douglas Gregor | 3ef1ad2 | 2011-07-27 05:22:46 +0000 | [diff] [blame] | 1 | |
| 2 | [Visualizer] |
| 3 | |
| 4 | llvm::SmallVector<*,*>{ |
| 5 | preview ( |
| 6 | #( |
| 7 | "[", |
| 8 | ($T1*)$e.EndX - ($T1*)$e.BeginX, |
| 9 | "](", |
| 10 | #array( |
| 11 | expr: (($T1*)$e.BeginX)[$i], |
| 12 | size: ($T1*)$e.EndX - ($T1*)$e.BeginX |
| 13 | ), |
| 14 | ")" |
| 15 | ) |
| 16 | ) |
| 17 | |
| 18 | children ( |
| 19 | #( |
| 20 | #([size] : ($T1*)$e.EndX - ($T1*)$e.BeginX), |
| 21 | #([capacity] : ($T1*)$e.CapacityX - ($T1*)$e.BeginX), |
| 22 | #array( |
| 23 | expr: (($T1*)$e.BeginX)[$i], |
| 24 | size: ($T1*)$e.EndX - ($T1*)$e.BeginX |
| 25 | ) |
| 26 | ) |
| 27 | ) |
| 28 | } |
| 29 | |
| 30 | llvm::StringRef{ |
| 31 | preview ([$e.Data,s]) |
| 32 | stringview ([$e.Data,sb]) |
| 33 | |
| 34 | children ( |
| 35 | #( |
| 36 | #([size] : $e.Length), |
| 37 | #array(expr: $e.Data[$i], size: $e.Length) |
| 38 | ) |
| 39 | ) |
| 40 | } |
| 41 | |
| 42 | clang::Token{ |
| 43 | preview((clang::tok::TokenKind)(int)$e.Kind) |
Aaron Ballman | fd8fed9 | 2012-02-06 20:47:31 +0000 | [diff] [blame] | 44 | } |
| 45 | |
| 46 | PointerIntPair<*,*,*,*>{ |
| 47 | preview ( |
| 48 | #( |
| 49 | ($T1*)($e.Value & PointerBitMask), |
| 50 | " [", |
| 51 | ($T3)(($e.Value >> IntShift) & IntMask), |
| 52 | "]" |
| 53 | ) |
| 54 | ) |
| 55 | |
| 56 | children ( |
| 57 | #( |
| 58 | #([ptr] : ($T1*)($e.Value & PointerBitMask)), |
| 59 | #([int] : ($T3)($e.Value >> IntShift) & IntMask) |
| 60 | ) |
| 61 | ) |
| 62 | } |
| 63 | |
| 64 | PointerUnion<*,*>{ |
| 65 | preview ( |
| 66 | #if ((($e.Val.Value >> $e.Val.IntShift) & $e.Val.IntMask) == 0) ( |
| 67 | "PT1" |
| 68 | ) #else ( |
| 69 | "PT2" |
| 70 | ) |
| 71 | ) |
| 72 | |
| 73 | children ( |
| 74 | #( |
| 75 | #if ((($e.Val.Value >> $e.Val.IntShift) & $e.Val.IntMask) == 0) ( |
| 76 | #([ptr] : ($T1)($e.Val.Value & $e.Val.PointerBitMask)) |
| 77 | ) #else ( |
| 78 | #([ptr] : ($T2)($e.Val.Value & $e.Val.PointerBitMask)) |
| 79 | ) |
| 80 | ) |
| 81 | ) |
| 82 | } |
| 83 | |
| 84 | PointerUnion3<*,*,*>{ |
| 85 | preview ( |
| 86 | #if (($e.Val.Val.Value & 0x2) == 2) ( |
| 87 | "PT2" |
| 88 | ) #elif (($e.Val.Val.Value & 0x1) == 1) ( |
| 89 | "PT3" |
| 90 | ) #else ( |
| 91 | "PT1" |
| 92 | ) |
| 93 | ) |
| 94 | |
| 95 | children ( |
| 96 | #( |
| 97 | #if (($e.Val.Val.Value & 0x2) == 2) ( |
| 98 | #([ptr] : ($T2)(($e.Val.Val.Value >> 2) << 2)) |
| 99 | ) #elif (($e.Val.Val.Value & 0x1) == 1) ( |
| 100 | #([ptr] : ($T3)(($e.Val.Val.Value >> 2) << 2)) |
| 101 | ) #else ( |
| 102 | #([ptr] : ($T1)(($e.Val.Val.Value >> 2) << 2)) |
| 103 | ) |
| 104 | ) |
| 105 | ) |
| 106 | } |
| 107 | |
| 108 | PointerUnion4<*,*,*,*>{ |
| 109 | preview ( |
| 110 | #if (($e.Val.Val.Value & 0x3) == 3) ( |
| 111 | "PT4" |
| 112 | ) #elif (($e.Val.Val.Value & 0x2) == 2) ( |
| 113 | "PT2" |
| 114 | ) #elif (($e.Val.Val.Value & 0x1) == 1) ( |
| 115 | "PT3" |
| 116 | ) #else ( |
| 117 | "PT1" |
| 118 | ) |
| 119 | ) |
| 120 | |
| 121 | children ( |
| 122 | #( |
| 123 | #if (($e.Val.Val.Value & 0x3) == 3) ( |
| 124 | #([ptr] : ($T4)(($e.Val.Val.Value >> 2) << 2)) |
| 125 | ) #elif (($e.Val.Val.Value & 0x2) == 2) ( |
| 126 | #([ptr] : ($T2)(($e.Val.Val.Value >> 2) << 2)) |
| 127 | ) #elif (($e.Val.Val.Value & 0x1) == 1) ( |
| 128 | #([ptr] : ($T3)(($e.Val.Val.Value >> 2) << 2)) |
| 129 | ) #else ( |
| 130 | #([ptr] : ($T1)(($e.Val.Val.Value >> 2) << 2)) |
| 131 | ) |
| 132 | ) |
| 133 | ) |
| 134 | } |