Author: aaronballman
Date: Mon Feb  6 14:47:31 2012
New Revision: 149896

URL: http://llvm.org/viewvc/llvm-project?rev=149896&view=rev
Log:
Added MSVC visualizers for PointerIntPair and PointerUnions.

Patch by Nikola Smiljanic

Modified:
    cfe/trunk/utils/clangVisualizers.txt

Modified: cfe/trunk/utils/clangVisualizers.txt
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/clangVisualizers.txt?rev=149896&r1=149895&r2=149896&view=diff
==============================================================================
--- cfe/trunk/utils/clangVisualizers.txt (original)
+++ cfe/trunk/utils/clangVisualizers.txt Mon Feb  6 14:47:31 2012
@@ -41,4 +41,94 @@
 
 clang::Token{
        preview((clang::tok::TokenKind)(int)$e.Kind)
-}
\ No newline at end of file
+}
+
+PointerIntPair<*,*,*,*>{
+       preview (
+               #(
+                       ($T1*)($e.Value & PointerBitMask),
+                       " [",
+                       ($T3)(($e.Value >> IntShift) & IntMask),
+                       "]"
+               )
+       )
+       
+       children (
+               #(
+                       #([ptr] : ($T1*)($e.Value & PointerBitMask)),
+                       #([int] : ($T3)($e.Value >> IntShift) & IntMask)
+               )
+       )
+}
+
+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))
+                       )
+               )
+       )
+}
+
+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))
+                       )
+               )
+       )
+}
+
+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))
+                       )
+               )
+       )
+}


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to