Aaron Ballman | 948d0bd | 2013-01-25 23:37:25 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?>
|
| 2 | <!--
|
| 3 | Visual Studio 2012 Native Debugging Visualizers for LLVM
|
| 4 |
|
| 5 | Put this file into "%USERPROFILE%\Documents\Visual Studio 2012\Visualizers"
|
| 6 | or create a symbolic link so it updates automatically.
|
| 7 | -->
|
| 8 | <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
| 9 | <Type Name="llvm::SmallVector<*,*>">
|
| 10 | <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) == 0">empty</DisplayString>
|
| 11 | <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) != 0">{{ size={($T1*)EndX - ($T1*)BeginX} }}</DisplayString>
|
| 12 | <Expand>
|
| 13 | <Item Name="[size]">($T1*)EndX - ($T1*)BeginX</Item>
|
| 14 | <Item Name="[capacity]">($T1*)CapacityX - ($T1*)BeginX</Item>
|
| 15 | <ArrayItems>
|
| 16 | <Size>($T1*)EndX - ($T1*)BeginX</Size>
|
| 17 | <ValuePointer>($T1*)BeginX</ValuePointer>
|
| 18 | </ArrayItems>
|
| 19 | </Expand>
|
| 20 | </Type>
|
| 21 |
|
| 22 | <Type Name="llvm::SmallVectorImpl<*>">
|
| 23 | <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) == 0">empty</DisplayString>
|
| 24 | <DisplayString Condition="(($T1*)EndX - ($T1*)BeginX) != 0">[{($T1*)EndX - ($T1*)BeginX}]</DisplayString>
|
| 25 | <Expand>
|
| 26 | <Item Name="[size]">($T1*)EndX - ($T1*)BeginX</Item>
|
| 27 | <Item Name="[capacity]">($T1*)CapacityX - ($T1*)BeginX</Item>
|
| 28 | <ArrayItems>
|
| 29 | <Size>($T1*)EndX - ($T1*)BeginX</Size>
|
| 30 | <ValuePointer>($T1*)BeginX</ValuePointer>
|
| 31 | </ArrayItems>
|
| 32 | </Expand>
|
| 33 | </Type>
|
| 34 |
|
| 35 | <Type Name="llvm::SmallString<*>">
|
| 36 | <DisplayString>{BeginX,s}</DisplayString>
|
| 37 | <StringView>BeginX,s</StringView>
|
| 38 | <Expand>
|
| 39 | <Item Name="[size]">(char*)EndX - (char*)BeginX</Item>
|
| 40 | <Item Name="[capacity]">(char*)CapacityX - (char*)BeginX</Item>
|
| 41 | <ArrayItems>
|
| 42 | <Size>(char*)EndX - (char*)BeginX</Size>
|
| 43 | <ValuePointer>(char*)BeginX</ValuePointer>
|
| 44 | </ArrayItems>
|
| 45 | </Expand>
|
| 46 | </Type>
|
| 47 |
|
| 48 | <Type Name="llvm::StringRef">
|
| 49 | <DisplayString>[{Length}] {Data,s}</DisplayString>
|
| 50 | <StringView>Data,s</StringView>
|
| 51 | <Expand>
|
| 52 | <Item Name="[length]">Length</Item>
|
| 53 | <ArrayItems>
|
| 54 | <Size>Length</Size>
|
| 55 | <ValuePointer>Data</ValuePointer>
|
| 56 | </ArrayItems>
|
| 57 | </Expand>
|
| 58 | </Type>
|
| 59 |
|
| 60 | <Type Name="llvm::PointerIntPair<*,*,*,*>">
|
| 61 | <DisplayString>{Value & PointerBitMask} [{(Value >> IntShift) & IntMask}]</DisplayString>
|
| 62 | <Expand>
|
| 63 | <Item Name="[ptr]">Value & PointerBitMask</Item>
|
| 64 | <Item Name="[int]">(Value >> IntShift) & IntMask</Item>
|
| 65 | </Expand>
|
| 66 | </Type>
|
| 67 |
|
| 68 | <Type Name="llvm::PointerUnion<*,*>">
|
| 69 | <DisplayString Condition="((Val.Value >> Val.IntShift) & Val.IntMask) == 0">[P1] {($T1)(Val.Value & Val.PointerBitMask)}</DisplayString>
|
| 70 | <DisplayString Condition="((Val.Value >> Val.IntShift) & Val.IntMask) != 0">[P2] {($T2)(Val.Value & Val.PointerBitMask)}</DisplayString>
|
| 71 | <Expand>
|
| 72 | <Item Name="[ptr]" Condition="((Val.Value >> Val.IntShift) & Val.IntMask) == 0">($T1)(Val.Value & Val.PointerBitMask)</Item>
|
| 73 | <Item Name="[ptr]" Condition="((Val.Value >> Val.IntShift) & Val.IntMask) != 0">($T2)(Val.Value & Val.PointerBitMask)</Item>
|
| 74 | </Expand>
|
| 75 | </Type>
|
| 76 |
|
| 77 | <Type Name="llvm::PointerUnion3<*,*,*>">
|
| 78 | <DisplayString Condition="(Val.Val.Value & 2) != 2 && (Val.Val.Value & 1) != 1">[P1] {($T1)((Val.Val.Value >> 2) << 2)}</DisplayString>
|
| 79 | <DisplayString Condition="(Val.Val.Value & 2) == 2">[P2] {($T2)((Val.Val.Value >> 2) << 2)}</DisplayString>
|
| 80 | <DisplayString Condition="(Val.Val.Value & 1) == 1">[P3] {($T3)((Val.Val.Value >> 2) << 2)}</DisplayString>
|
| 81 | <Expand>
|
| 82 | <Item Name="[ptr]" Condition="(Val.Val.Value & 2) != 2 && (Val.Val.Value & 1) != 1">($T1)((Val.Val.Value >> 2) << 2)</Item>
|
| 83 | <Item Name="[ptr]" Condition="(Val.Val.Value & 2) == 2">($T2)((Val.Val.Value >> 2) << 2)</Item>
|
| 84 | <Item Name="[ptr]" Condition="(Val.Val.Value & 1) == 1">($T3)((Val.Val.Value >> 2) << 2)</Item>
|
| 85 | </Expand>
|
| 86 | </Type>
|
| 87 |
|
| 88 | <Type Name="llvm::PointerUnion4<*,*,*,*>">
|
| 89 | <DisplayString Condition="(Val.Val.Value & 3) != 3 && (Val.Val.Value & 2) != 2 && (Val.Val.Value & 1) != 1">[P1] {($T1)((Val.Val.Value >> 2) << 2)}</DisplayString>
|
| 90 | <DisplayString Condition="(Val.Val.Value & 3) != 3 && (Val.Val.Value & 2) == 2">[P2] {($T2)((Val.Val.Value >> 2) << 2)}</DisplayString>
|
| 91 | <DisplayString Condition="(Val.Val.Value & 3) != 3 && (Val.Val.Value & 1) == 1">[P3] {($T3)((Val.Val.Value >> 2) << 2)}</DisplayString>
|
| 92 | <DisplayString Condition="(Val.Val.Value & 3) == 3">[P4] {($T4)((Val.Val.Value >> 2) << 2)}</DisplayString>
|
| 93 | <Expand>
|
| 94 | <Item Name="[ptr]" Condition="(Val.Val.Value & 3) != 3 && (Val.Val.Value & 2) != 2 && (Val.Val.Value & 1) != 1">($T1)((Val.Val.Value >> 2) << 2)</Item>
|
| 95 | <Item Name="[ptr]" Condition="(Val.Val.Value & 3) != 3 && (Val.Val.Value & 2) == 2">($T2)((Val.Val.Value >> 2) << 2)</Item>
|
| 96 | <Item Name="[ptr]" Condition="(Val.Val.Value & 3) != 3 && (Val.Val.Value & 1) == 1">($T3)((Val.Val.Value >> 2) << 2)</Item>
|
| 97 | <Item Name="[ptr]" Condition="(Val.Val.Value & 3) == 3">($T4)((Val.Val.Value >> 2) << 2)</Item>
|
| 98 | </Expand>
|
| 99 | </Type>
|
| 100 |
|
| 101 | <Type Name="llvm::iplist<*,*>">
|
| 102 | <DisplayString Condition="Head == 0">{{ empty }}</DisplayString>
|
| 103 | <DisplayString Condition="Head != 0">{{ head={Head} }}</DisplayString>
|
| 104 | <Expand>
|
| 105 | <LinkedListItems>
|
| 106 | <HeadPointer>Head</HeadPointer>
|
| 107 | <NextPointer>Next</NextPointer>
|
| 108 | <ValueNode>this</ValueNode>
|
| 109 | </LinkedListItems>
|
| 110 | </Expand>
|
| 111 | </Type>
|
| 112 |
|
| 113 | <Type Name="llvm::IntrusiveRefCntPtr<*>">
|
| 114 | <DisplayString Condition="Obj == 0">empty</DisplayString>
|
| 115 | <DisplayString Condition="(Obj != 0) && (Obj->ref_cnt == 1)">RefPtr [1 ref] {*Obj}</DisplayString>
|
| 116 | <DisplayString Condition="(Obj != 0) && (Obj->ref_cnt != 1)">RefPtr [{Obj->ref_cnt} refs] {*Obj}</DisplayString>
|
| 117 | <Expand>
|
| 118 | <Item Condition="Obj != 0" Name="[refs]">Obj->ref_cnt</Item>
|
| 119 | <Item Condition="Obj != 0" Name="[ptr]">Obj</Item>
|
| 120 | </Expand>
|
| 121 | </Type>
|
| 122 |
|
| 123 | <Type Name="llvm::OwningPtr<*>">
|
| 124 | <DisplayString Condition="Ptr == 0">empty</DisplayString>
|
| 125 | <DisplayString Condition="Ptr != 0">OwningPtr {*Ptr}</DisplayString>
|
| 126 | <Expand>
|
| 127 | <Item Condition="Ptr != 0" Name="[ptr]">Ptr</Item>
|
| 128 | </Expand>
|
| 129 | </Type>
|
| 130 |
|
| 131 | <Type Name="llvm::SmallPtrSet<*,*>">
|
| 132 | <DisplayString Condition="CurArray == SmallArray">{{ [Small Mode] elements={NumElements}, arraySize={CurArraySize} }}</DisplayString>
|
| 133 | <DisplayString Condition="CurArray != SmallArray">{{ [Big Mode] elements={NumElements}, arraySize={CurArraySize} }}</DisplayString>
|
| 134 | <Expand>
|
| 135 | <Item Name="[NumElements]">NumElements</Item>
|
| 136 | <Item Name="[CurArraySize]">CurArraySize</Item>
|
| 137 | <IndexListItems>
|
| 138 | <Size>CurArraySize + 1</Size>
|
| 139 | <ValueNode>($T1*)&CurArray[$i]</ValueNode>
|
| 140 | </IndexListItems>
|
| 141 | </Expand>
|
| 142 | </Type>
|
| 143 |
|
| 144 | <Type Name="llvm::DenseMap<*,*,*>">
|
| 145 | <DisplayString Condition="NumEntries == 0">empty</DisplayString>
|
| 146 | <DisplayString Condition="NumEntries != 0">{{ entries={NumEntries}, buckets={NumBuckets} }}</DisplayString>
|
| 147 | <Expand>
|
| 148 | <Item Name="[NumEntries]">NumEntries</Item>
|
| 149 | <Item Name="[NumBuckets]">NumBuckets</Item>
|
| 150 | <ArrayItems>
|
| 151 | <Size>NumBuckets</Size>
|
| 152 | <ValuePointer>Buckets</ValuePointer>
|
| 153 | </ArrayItems>
|
| 154 | </Expand>
|
| 155 | </Type>
|
| 156 |
|
| 157 | <Type Name="llvm::StringMap<*,*>">
|
| 158 | <DisplayString>{{ NumBuckets={NumBuckets}, ItemSize={ItemSize} }}</DisplayString>
|
| 159 | <Expand>
|
| 160 | <Item Name="[NumBuckets]">NumBuckets</Item>
|
| 161 | <Item Name="[ItemSize]">ItemSize</Item>
|
| 162 | <IndexListItems>
|
| 163 | <Size>NumBuckets</Size>
|
| 164 | <ValueNode>(llvm::StringMapEntry<$T1>*)TheTable[$i]</ValueNode>
|
| 165 | </IndexListItems>
|
| 166 | </Expand>
|
| 167 | </Type>
|
| 168 |
|
| 169 | <Type Name="llvm::StringMapEntry<*>">
|
| 170 | <DisplayString Condition="StrLen == 0">empty</DisplayString>
|
| 171 | <DisplayString Condition="StrLen != 0">({((llvm::StringMapEntry<$T1>*)this)+1,s}, {second})</DisplayString>
|
| 172 | <Expand>
|
| 173 | <Item Name="[key]">((llvm::StringMapEntry<$T1>*)this)+1,s</Item>
|
| 174 | <Item Name="[value]" Condition="StrLen != 0">second</Item>
|
| 175 | </Expand>
|
| 176 | </Type>
|
| 177 |
|
| 178 | <Type Name="llvm::Triple">
|
| 179 | <DisplayString>{Data}</DisplayString>
|
| 180 | </Type>
|
| 181 | </AutoVisualizer>
|