forked from OSchip/llvm-project
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:
parent
c8735fbb4c
commit
148e86fdd0
|
@ -195,10 +195,19 @@ For later versions of Visual Studio, no setup is required.
|
|||
</Type>
|
||||
|
||||
<Type Name="llvm::Optional<*>">
|
||||
<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<*>">
|
||||
<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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue