Skip to content

Commit 0ed248a

Browse files
committed
Natvis file update for improved debugging view of IR constructs
1 parent 3d90678 commit 0ed248a

File tree

1 file changed

+34
-2
lines changed

1 file changed

+34
-2
lines changed

source/slang/slang.natvis

+34-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,25 @@
3535
<Type Name="Slang::NameLoc">
3636
<DisplayString>{{name={(char*)((*name).text.buffer.pointer+1), s} loc={loc.raw}}}</DisplayString>
3737
</Type>
38-
39-
<Type Name="Slang::IRInst">
38+
<Type Name="Slang::IRValue">
39+
<DisplayString>{{{op}}}</DisplayString>
40+
<Expand>
41+
<Item Name="[OpCode]">op</Item>
42+
<Item Name="[Type]">type</Item>
43+
<Item Name="[IRInst]">(Slang::IRInst*)this</Item>
44+
<ExpandedItem Condition="op==kIROp_decl_ref">(Slang::IRDeclRef*)this</ExpandedItem>
45+
<ExpandedItem Condition="op==kIROp_Func">(Slang::IRFunc*)this</ExpandedItem>
46+
<ExpandedItem Condition="op==kIROp_Block">(Slang::IRBlock*)this</ExpandedItem>
47+
<Item Name="====Uses====">"-------"</Item>
48+
<LinkedListItems>
49+
<HeadPointer>firstUse</HeadPointer>
50+
<NextPointer>nextUse</NextPointer>
51+
<ValueNode>usedValue</ValueNode>
52+
</LinkedListItems>
53+
54+
</Expand>
55+
</Type>
56+
<Type Name="Slang::IRUser">
4057
<DisplayString>{{{op}}}</DisplayString>
4158
<Expand>
4259
<Item Name="[OpCode]">op</Item>
@@ -65,4 +82,19 @@
6582
<Item Name="[FirstBlock]">firstBlock</Item>
6683
</Expand>
6784
</Type>
85+
86+
<Type Name="Slang::IRDeclRef">
87+
<DisplayString>{{IRDeclRef {declRef}}}</DisplayString>
88+
<Expand>
89+
<Item Name="[OpCode]">op</Item>
90+
<ExpandedItem>declRef</ExpandedItem>
91+
</Expand>
92+
</Type>
93+
<Type Name="Slang::IRUse">
94+
<DisplayString>{{IRUse {usedValue}}}</DisplayString>
95+
<Expand>
96+
<Item Name="[NextUse]">nextUse</Item>
97+
<ExpandedItem>usedValue</ExpandedItem>
98+
</Expand>
99+
</Type>
68100
</AutoVisualizer>

0 commit comments

Comments
 (0)