1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00

2 VS natvis improvements.

Optional<T> was broken due to a change in the class's internals.
That is fixed, and additionally a visualizer is added for
Expected<T>.

llvm-svn: 335892
This commit is contained in:
Zachary Turner 2018-06-28 17:55:54 +00:00
parent 22b403910a
commit 829455b0ec

View File

@ -195,10 +195,19 @@ For later versions of Visual Studio, no setup is required.
</Type>
<Type Name="llvm::Optional&lt;*&gt;">
<DisplayString Condition="!hasVal">empty</DisplayString>
<DisplayString Condition="hasVal">{*(($T1 *)(unsigned char *)storage.buffer)}</DisplayString>
<DisplayString Condition="!Storage.hasVal">None</DisplayString>
<DisplayString Condition="Storage.hasVal">{*(($T1 *)(unsigned char *)Storage.storage.buffer)}</DisplayString>
<Expand>
<Item Name="[underlying]" Condition="hasVal">*(($T1 *)(unsigned char *)storage.buffer)</Item>
<Item Name="[underlying]" Condition="Storage.hasVal">*(($T1 *)(unsigned char *)Storage.storage.buffer)</Item>
</Expand>
</Type>
<Type Name="llvm::Expected&lt;*&gt;">
<DisplayString Condition="HasError">Error</DisplayString>
<DisplayString Condition="!HasError">{*((storage_type *)TStorage.buffer)}</DisplayString>
<Expand>
<Item Name="[value]" Condition="!HasError">*((storage_type *)TStorage.buffer)</Item>
<Item Name="[error]" Condition="HasError">*((error_type *)ErrorStorage.buffer)</Item>
</Expand>
</Type>