Skip to content

Commit

Permalink
[llvm][utils] Disable lldb formatters for PointerIntPair and PointerU…
Browse files Browse the repository at this point in the history
…nion

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
  • Loading branch information
kastiglione committed Jul 13, 2023
1 parent b716d4e commit f0acfaf
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions llvm/utils/lldbDataFormatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,20 @@ def __lldb_init_module(debugger, internal_dict):
"-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
Expand Down

0 comments on commit f0acfaf

Please sign in to comment.