[PATCH] D157961: [llvm][utils] Fix SmallVector formatter when type is a pointer

Michael Buch via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 15:10:23 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbb90a5cf2041: [llvm][utils] Fix SmallVector formatter when type is a pointer (authored by Michael137).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157961/new/

https://reviews.llvm.org/D157961

Files:
  llvm/utils/lldbDataFormatters.py


Index: llvm/utils/lldbDataFormatters.py
===================================================================
--- llvm/utils/lldbDataFormatters.py
+++ llvm/utils/lldbDataFormatters.py
@@ -129,6 +129,9 @@
         if the_type.IsReferenceType():
             the_type = the_type.GetDereferencedType()
 
+        if the_type.IsPointerType():
+            the_type = the_type.GetPointeeType()
+
         self.data_type = the_type.GetTemplateArgumentType(0)
         self.type_size = self.data_type.GetByteSize()
         assert self.type_size != 0


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157961.550498.patch
Type: text/x-patch
Size: 542 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230815/95f0042a/attachment.bin>


More information about the llvm-commits mailing list