[PATCH] D155219: [llvm][utils] Disable lldb formatters for PointerIntPair and PointerUnion

Dave Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 10:09:01 PDT 2023


kastiglione created this revision.
kastiglione added reviewers: Michael137, delcypher.
Herald added a project: All.
kastiglione requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

These synthetic providers use expression evaluation and fail in some cases.

Examples:

  llvm::PointerIntPair<llvm::PointerUnion<const Type *, const ExtQuals *>, 
                       Qualifiers::FastWidth> Value;                       

and

  typedef llvm::PointerUnion<const ValueDecl *, const Expr *, TypeInfoLValue,
                             DynamicAllocLValue>
          PtrTy;

Original contribution: D117779 <https://reviews.llvm.org/D117779>

rdar://110791233
rdar://112195543


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155219

Files:
  llvm/utils/lldbDataFormatters.py


Index: llvm/utils/lldbDataFormatters.py
===================================================================
--- llvm/utils/lldbDataFormatters.py
+++ llvm/utils/lldbDataFormatters.py
@@ -65,16 +65,20 @@
         "-F lldbDataFormatters.ConstStringSummaryProvider "
         '-x "^lldb_private::ConstString$"'
     )
-    debugger.HandleCommand(
-        "type synthetic add -w llvm "
-        "-l lldbDataFormatters.PointerIntPairSynthProvider "
-        '-x "^llvm::PointerIntPair<.+>$"'
-    )
-    debugger.HandleCommand(
-        "type synthetic add -w llvm "
-        "-l lldbDataFormatters.PointerUnionSynthProvider "
-        '-x "^llvm::PointerUnion<.+>$"'
-    )
+
+    # The synthetic providers for PointerIntPair and PointerUnion are disabled
+    # because of a few issues. One example is template arguments that are
+    # non-pointer types that instead specialize PointerLikeTypeTraits.
+    # debugger.HandleCommand(
+    #     "type synthetic add -w llvm "
+    #     "-l lldbDataFormatters.PointerIntPairSynthProvider "
+    #     '-x "^llvm::PointerIntPair<.+>$"'
+    # )
+    # debugger.HandleCommand(
+    #     "type synthetic add -w llvm "
+    #     "-l lldbDataFormatters.PointerUnionSynthProvider "
+    #     '-x "^llvm::PointerUnion<.+>$"'
+    # )
 
 
 # Pretty printer for llvm::SmallVector/llvm::SmallVectorImpl


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155219.540097.patch
Type: text/x-patch
Size: 1341 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230713/2ae08699/attachment.bin>


More information about the llvm-commits mailing list