summaryrefslogtreecommitdiff
path: root/clang/utils/clangVisualizers.txt
diff options
context:
space:
mode:
authorCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-10-15 17:10:06 +1100
committerCarlo Zancanaro <carlo@pc-4w14-0.cs.usyd.edu.au>2012-10-15 17:10:06 +1100
commitbe1de4be954c80875ad4108e0a33e8e131b2f2c0 (patch)
tree1fbbecf276bf7c7bdcbb4dd446099d6d90eaa516 /clang/utils/clangVisualizers.txt
parentc4626a62754862d20b41e8a46a3574264ea80e6d (diff)
parentf1bd2e48c5324d3f7cda4090c87f8a5b6f463ce2 (diff)
Merge branch 'master' of ssh://bitbucket.org/czan/honours
Diffstat (limited to 'clang/utils/clangVisualizers.txt')
-rw-r--r--clang/utils/clangVisualizers.txt134
1 files changed, 134 insertions, 0 deletions
diff --git a/clang/utils/clangVisualizers.txt b/clang/utils/clangVisualizers.txt
new file mode 100644
index 0000000..0fef65f
--- /dev/null
+++ b/clang/utils/clangVisualizers.txt
@@ -0,0 +1,134 @@
+
+[Visualizer]
+
+llvm::SmallVector<*,*>{
+ preview (
+ #(
+ "[",
+ ($T1*)$e.EndX - ($T1*)$e.BeginX,
+ "](",
+ #array(
+ expr: (($T1*)$e.BeginX)[$i],
+ size: ($T1*)$e.EndX - ($T1*)$e.BeginX
+ ),
+ ")"
+ )
+ )
+
+ children (
+ #(
+ #([size] : ($T1*)$e.EndX - ($T1*)$e.BeginX),
+ #([capacity] : ($T1*)$e.CapacityX - ($T1*)$e.BeginX),
+ #array(
+ expr: (($T1*)$e.BeginX)[$i],
+ size: ($T1*)$e.EndX - ($T1*)$e.BeginX
+ )
+ )
+ )
+}
+
+llvm::StringRef{
+ preview ([$e.Data,s])
+ stringview ([$e.Data,sb])
+
+ children (
+ #(
+ #([size] : $e.Length),
+ #array(expr: $e.Data[$i], size: $e.Length)
+ )
+ )
+}
+
+clang::Token{
+ preview((clang::tok::TokenKind)(int)$e.Kind)
+}
+
+llvm::PointerIntPair<*,*,*,*>{
+ preview (
+ #(
+ ($T1*)($e.Value & $e.PointerBitMask),
+ " [",
+ ($T3)(($e.Value >> $e.IntShift) & $e.IntMask),
+ "]"
+ )
+ )
+
+ children (
+ #(
+ #([ptr] : ($T1*)($e.Value & $e.PointerBitMask)),
+ #([int] : ($T3)($e.Value >> $e.IntShift) & $e.IntMask)
+ )
+ )
+}
+
+llvm::PointerUnion<*,*>{
+ preview (
+ #if ((($e.Val.Value >> $e.Val.IntShift) & $e.Val.IntMask) == 0) (
+ "PT1"
+ ) #else (
+ "PT2"
+ )
+ )
+
+ children (
+ #(
+ #if ((($e.Val.Value >> $e.Val.IntShift) & $e.Val.IntMask) == 0) (
+ #([ptr] : ($T1)($e.Val.Value & $e.Val.PointerBitMask))
+ ) #else (
+ #([ptr] : ($T2)($e.Val.Value & $e.Val.PointerBitMask))
+ )
+ )
+ )
+}
+
+llvm::PointerUnion3<*,*,*>{
+ preview (
+ #if (($e.Val.Val.Value & 0x2) == 2) (
+ "PT2"
+ ) #elif (($e.Val.Val.Value & 0x1) == 1) (
+ "PT3"
+ ) #else (
+ "PT1"
+ )
+ )
+
+ children (
+ #(
+ #if (($e.Val.Val.Value & 0x2) == 2) (
+ #([ptr] : ($T2)(($e.Val.Val.Value >> 2) << 2))
+ ) #elif (($e.Val.Val.Value & 0x1) == 1) (
+ #([ptr] : ($T3)(($e.Val.Val.Value >> 2) << 2))
+ ) #else (
+ #([ptr] : ($T1)(($e.Val.Val.Value >> 2) << 2))
+ )
+ )
+ )
+}
+
+llvm::PointerUnion4<*,*,*,*>{
+ preview (
+ #if (($e.Val.Val.Value & 0x3) == 3) (
+ "PT4"
+ ) #elif (($e.Val.Val.Value & 0x2) == 2) (
+ "PT2"
+ ) #elif (($e.Val.Val.Value & 0x1) == 1) (
+ "PT3"
+ ) #else (
+ "PT1"
+ )
+ )
+
+ children (
+ #(
+ #if (($e.Val.Val.Value & 0x3) == 3) (
+ #([ptr] : ($T4)(($e.Val.Val.Value >> 2) << 2))
+ ) #elif (($e.Val.Val.Value & 0x2) == 2) (
+ #([ptr] : ($T2)(($e.Val.Val.Value >> 2) << 2))
+ ) #elif (($e.Val.Val.Value & 0x1) == 1) (
+ #([ptr] : ($T3)(($e.Val.Val.Value >> 2) << 2))
+ ) #else (
+ #([ptr] : ($T1)(($e.Val.Val.Value >> 2) << 2))
+ )
+ )
+ )
+}