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 | |
David Blaikie | 789acdd | 2012-04-19 17:26:49 +0000 | [diff] [blame] | 30 | llvm::SmallVectorImpl<*>{ |
| 31 | preview ( |
| 32 | #( |
| 33 | "[", |
| 34 | ($T1*)$e.EndX - ($T1*)$e.BeginX, |
| 35 | "](", |
| 36 | #array( |
| 37 | expr: (($T1*)$e.BeginX)[$i], |
| 38 | size: ($T1*)$e.EndX - ($T1*)$e.BeginX |
| 39 | ), |
| 40 | ")" |
| 41 | ) |
| 42 | ) |
| 43 | |
| 44 | children ( |
| 45 | #( |
| 46 | #([size] : ($T1*)$e.EndX - ($T1*)$e.BeginX), |
| 47 | #([capacity] : ($T1*)$e.CapacityX - ($T1*)$e.BeginX), |
| 48 | #array( |
| 49 | expr: (($T1*)$e.BeginX)[$i], |
| 50 | size: ($T1*)$e.EndX - ($T1*)$e.BeginX |
| 51 | ) |
| 52 | ) |
| 53 | ) |
| 54 | } |
| 55 | |
David Blaikie | c4968d6 | 2012-05-16 22:28:47 +0000 | [diff] [blame^] | 56 | llvm::SmallString<*>{ |
| 57 | preview ([$e.BeginX,s]) |
| 58 | stringview ([$e.BeginX,sb]) |
| 59 | } |
| 60 | |
Douglas Gregor | 3ef1ad2 | 2011-07-27 05:22:46 +0000 | [diff] [blame] | 61 | llvm::StringRef{ |
| 62 | preview ([$e.Data,s]) |
| 63 | stringview ([$e.Data,sb]) |
| 64 | |
| 65 | children ( |
| 66 | #( |
| 67 | #([size] : $e.Length), |
| 68 | #array(expr: $e.Data[$i], size: $e.Length) |
| 69 | ) |
| 70 | ) |
| 71 | } |
| 72 | |
| 73 | clang::Token{ |
| 74 | preview((clang::tok::TokenKind)(int)$e.Kind) |
Aaron Ballman | fd8fed9 | 2012-02-06 20:47:31 +0000 | [diff] [blame] | 75 | } |
| 76 | |
Aaron Ballman | b017ea2 | 2012-03-10 22:28:45 +0000 | [diff] [blame] | 77 | llvm::PointerIntPair<*,*,*,*>{ |
Aaron Ballman | fd8fed9 | 2012-02-06 20:47:31 +0000 | [diff] [blame] | 78 | preview ( |
| 79 | #( |
Aaron Ballman | b017ea2 | 2012-03-10 22:28:45 +0000 | [diff] [blame] | 80 | ($T1*)($e.Value & $e.PointerBitMask), |
Aaron Ballman | fd8fed9 | 2012-02-06 20:47:31 +0000 | [diff] [blame] | 81 | " [", |
Aaron Ballman | b017ea2 | 2012-03-10 22:28:45 +0000 | [diff] [blame] | 82 | ($T3)(($e.Value >> $e.IntShift) & $e.IntMask), |
Aaron Ballman | fd8fed9 | 2012-02-06 20:47:31 +0000 | [diff] [blame] | 83 | "]" |
| 84 | ) |
| 85 | ) |
| 86 | |
| 87 | children ( |
| 88 | #( |
Aaron Ballman | b017ea2 | 2012-03-10 22:28:45 +0000 | [diff] [blame] | 89 | #([ptr] : ($T1*)($e.Value & $e.PointerBitMask)), |
| 90 | #([int] : ($T3)($e.Value >> $e.IntShift) & $e.IntMask) |
Aaron Ballman | fd8fed9 | 2012-02-06 20:47:31 +0000 | [diff] [blame] | 91 | ) |
| 92 | ) |
| 93 | } |
| 94 | |
Aaron Ballman | b017ea2 | 2012-03-10 22:28:45 +0000 | [diff] [blame] | 95 | llvm::PointerUnion<*,*>{ |
Aaron Ballman | fd8fed9 | 2012-02-06 20:47:31 +0000 | [diff] [blame] | 96 | preview ( |
| 97 | #if ((($e.Val.Value >> $e.Val.IntShift) & $e.Val.IntMask) == 0) ( |
| 98 | "PT1" |
| 99 | ) #else ( |
| 100 | "PT2" |
| 101 | ) |
| 102 | ) |
| 103 | |
| 104 | children ( |
| 105 | #( |
| 106 | #if ((($e.Val.Value >> $e.Val.IntShift) & $e.Val.IntMask) == 0) ( |
| 107 | #([ptr] : ($T1)($e.Val.Value & $e.Val.PointerBitMask)) |
| 108 | ) #else ( |
| 109 | #([ptr] : ($T2)($e.Val.Value & $e.Val.PointerBitMask)) |
| 110 | ) |
| 111 | ) |
| 112 | ) |
| 113 | } |
| 114 | |
Aaron Ballman | b017ea2 | 2012-03-10 22:28:45 +0000 | [diff] [blame] | 115 | llvm::PointerUnion3<*,*,*>{ |
Aaron Ballman | fd8fed9 | 2012-02-06 20:47:31 +0000 | [diff] [blame] | 116 | preview ( |
| 117 | #if (($e.Val.Val.Value & 0x2) == 2) ( |
| 118 | "PT2" |
| 119 | ) #elif (($e.Val.Val.Value & 0x1) == 1) ( |
| 120 | "PT3" |
| 121 | ) #else ( |
| 122 | "PT1" |
| 123 | ) |
| 124 | ) |
| 125 | |
| 126 | children ( |
| 127 | #( |
| 128 | #if (($e.Val.Val.Value & 0x2) == 2) ( |
| 129 | #([ptr] : ($T2)(($e.Val.Val.Value >> 2) << 2)) |
| 130 | ) #elif (($e.Val.Val.Value & 0x1) == 1) ( |
| 131 | #([ptr] : ($T3)(($e.Val.Val.Value >> 2) << 2)) |
| 132 | ) #else ( |
| 133 | #([ptr] : ($T1)(($e.Val.Val.Value >> 2) << 2)) |
| 134 | ) |
| 135 | ) |
| 136 | ) |
| 137 | } |
| 138 | |
Aaron Ballman | b017ea2 | 2012-03-10 22:28:45 +0000 | [diff] [blame] | 139 | llvm::PointerUnion4<*,*,*,*>{ |
Aaron Ballman | fd8fed9 | 2012-02-06 20:47:31 +0000 | [diff] [blame] | 140 | preview ( |
| 141 | #if (($e.Val.Val.Value & 0x3) == 3) ( |
| 142 | "PT4" |
| 143 | ) #elif (($e.Val.Val.Value & 0x2) == 2) ( |
| 144 | "PT2" |
| 145 | ) #elif (($e.Val.Val.Value & 0x1) == 1) ( |
| 146 | "PT3" |
| 147 | ) #else ( |
| 148 | "PT1" |
| 149 | ) |
| 150 | ) |
| 151 | |
| 152 | children ( |
| 153 | #( |
| 154 | #if (($e.Val.Val.Value & 0x3) == 3) ( |
| 155 | #([ptr] : ($T4)(($e.Val.Val.Value >> 2) << 2)) |
| 156 | ) #elif (($e.Val.Val.Value & 0x2) == 2) ( |
| 157 | #([ptr] : ($T2)(($e.Val.Val.Value >> 2) << 2)) |
| 158 | ) #elif (($e.Val.Val.Value & 0x1) == 1) ( |
| 159 | #([ptr] : ($T3)(($e.Val.Val.Value >> 2) << 2)) |
| 160 | ) #else ( |
| 161 | #([ptr] : ($T1)(($e.Val.Val.Value >> 2) << 2)) |
| 162 | ) |
| 163 | ) |
| 164 | ) |
| 165 | } |