Skip to content

Commit f0acfaf

Browse files
committed
[llvm][utils] Disable lldb formatters for PointerIntPair and PointerUnion
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 rdar://110791233 rdar://112195543 Differential Revision: https://reviews.llvm.org/D155219
1 parent b716d4e commit f0acfaf

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

llvm/utils/lldbDataFormatters.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,20 @@ def __lldb_init_module(debugger, internal_dict):
6565
"-F lldbDataFormatters.ConstStringSummaryProvider "
6666
'-x "^lldb_private::ConstString$"'
6767
)
68-
debugger.HandleCommand(
69-
"type synthetic add -w llvm "
70-
"-l lldbDataFormatters.PointerIntPairSynthProvider "
71-
'-x "^llvm::PointerIntPair<.+>$"'
72-
)
73-
debugger.HandleCommand(
74-
"type synthetic add -w llvm "
75-
"-l lldbDataFormatters.PointerUnionSynthProvider "
76-
'-x "^llvm::PointerUnion<.+>$"'
77-
)
68+
69+
# The synthetic providers for PointerIntPair and PointerUnion are disabled
70+
# because of a few issues. One example is template arguments that are
71+
# non-pointer types that instead specialize PointerLikeTypeTraits.
72+
# debugger.HandleCommand(
73+
# "type synthetic add -w llvm "
74+
# "-l lldbDataFormatters.PointerIntPairSynthProvider "
75+
# '-x "^llvm::PointerIntPair<.+>$"'
76+
# )
77+
# debugger.HandleCommand(
78+
# "type synthetic add -w llvm "
79+
# "-l lldbDataFormatters.PointerUnionSynthProvider "
80+
# '-x "^llvm::PointerUnion<.+>$"'
81+
# )
7882

7983

8084
# Pretty printer for llvm::SmallVector/llvm::SmallVectorImpl

0 commit comments

Comments
 (0)