[llvm] 4100cf2 - [Visualizers] Fix Optional visualizer.

Marek Kurdej via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 25 05:16:08 PST 2022


Author: Marek Kurdej
Date: 2022-01-25T14:16:03+01:00
New Revision: 4100cf2e92594342b53138bdbeeba220c7dd82c0

URL: https://github.com/llvm/llvm-project/commit/4100cf2e92594342b53138bdbeeba220c7dd82c0
DIFF: https://github.com/llvm/llvm-project/commit/4100cf2e92594342b53138bdbeeba220c7dd82c0.diff

LOG: [Visualizers] Fix Optional visualizer.

As discussed in https://reviews.llvm.org/D118105#3268773, OptionalStorage has been changed in commit https://github.com/llvm/llvm-project/commit/fb9730575086b3c2ba38a1aabf3106b01339888b, but the visualizer still tries to use old members.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D118117

Added: 
    

Modified: 
    llvm/utils/LLVMVisualizers/llvm.natvis

Removed: 
    


################################################################################
diff  --git a/llvm/utils/LLVMVisualizers/llvm.natvis b/llvm/utils/LLVMVisualizers/llvm.natvis
index 6e75ebd6f4bba..108f1912c75e8 100644
--- a/llvm/utils/LLVMVisualizers/llvm.natvis
+++ b/llvm/utils/LLVMVisualizers/llvm.natvis
@@ -197,9 +197,9 @@ For later versions of Visual Studio, no setup is required.
   
   <Type Name="llvm::Optional<*>">
     <DisplayString Condition="!Storage.hasVal">None</DisplayString>
-    <DisplayString Condition="Storage.hasVal">{*(($T1 *)(unsigned char *)Storage.storage.buffer)}</DisplayString>
+    <DisplayString Condition="Storage.hasVal">{Storage.value}</DisplayString>
     <Expand>
-      <Item Name="[underlying]" Condition="Storage.hasVal">*(($T1 *)(unsigned char *)Storage.storage.buffer)</Item>
+      <Item Name="[underlying]" Condition="Storage.hasVal">Storage.value</Item>
     </Expand>
   </Type>
 


        


More information about the llvm-commits mailing list