[llvm] r335892 - 2 VS natvis improvements.
Zachary Turner via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 28 10:55:54 PDT 2018
Author: zturner
Date: Thu Jun 28 10:55:54 2018
New Revision: 335892
URL: http://llvm.org/viewvc/llvm-project?rev=335892&view=rev
Log:
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>.
Modified:
llvm/trunk/utils/LLVMVisualizers/llvm.natvis
Modified: llvm/trunk/utils/LLVMVisualizers/llvm.natvis
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/LLVMVisualizers/llvm.natvis?rev=335892&r1=335891&r2=335892&view=diff
==============================================================================
--- llvm/trunk/utils/LLVMVisualizers/llvm.natvis (original)
+++ llvm/trunk/utils/LLVMVisualizers/llvm.natvis Thu Jun 28 10:55:54 2018
@@ -195,10 +195,19 @@ For later versions of Visual Studio, no
</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>
More information about the llvm-commits
mailing list