[PATCH] D118117: [Visualizers] Fix Optional visualizer.

Marek Kurdej via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 25 03:11:52 PST 2022


curdeius created this revision.
curdeius added a reviewer: RKSimon.
curdeius requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118117

Files:
  llvm/utils/LLVMVisualizers/llvm.natvis


Index: llvm/utils/LLVMVisualizers/llvm.natvis
===================================================================
--- llvm/utils/LLVMVisualizers/llvm.natvis
+++ llvm/utils/LLVMVisualizers/llvm.natvis
@@ -197,9 +197,9 @@
   
   <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>
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118117.402820.patch
Type: text/x-patch
Size: 779 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220125/4c5a8394/attachment-0001.bin>


More information about the llvm-commits mailing list