Skip to content

Commit

Permalink
Add visualizer for span (#1774)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamBucior authored Apr 7, 2021
1 parent fb2f89f commit 318dcb3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions stl/debugger/STL.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -1631,4 +1631,24 @@ SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
<Expand/>
</Type>

<Type Name="std::span&lt;*&gt;">
<Intrinsic Name="data" Expression="_Mydata" />
<Intrinsic Name="size" Expression="_Mysize" />
<Intrinsic Name="size_bytes" Expression="_Mysize * sizeof(element_type)" />
<DisplayString>{{ size={size()} }}</DisplayString>
<Expand>
<ArrayItems>
<Size>size()</Size>
<ValuePointer>data()</ValuePointer>
</ArrayItems>
</Expand>
</Type>

<Type Name="std::_Span_iterator&lt;*&gt;">
<SmartPointer Usage="Indexable">_Myptr,na</SmartPointer>
<Expand>
<Item Name="[ptr]">_Myptr</Item>
</Expand>
</Type>

</AutoVisualizer>

0 comments on commit 318dcb3

Please sign in to comment.