[all-commits] [llvm/llvm-project] bb90a5: [llvm][utils] Fix SmallVector formatter when type ...

Michael Buch via All-commits all-commits at lists.llvm.org
Tue Aug 15 15:10:24 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bb90a5cf204119c87452f1d98338b3768fedb184
      https://github.com/llvm/llvm-project/commit/bb90a5cf204119c87452f1d98338b3768fedb184
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2023-08-15 (Tue, 15 Aug 2023)

  Changed paths:
    M llvm/utils/lldbDataFormatters.py

  Log Message:
  -----------
  [llvm][utils] Fix SmallVector formatter when type is a pointer

Previously types such as `SmallVector<clang::Attr, 4> *` would
trigger the assertion inside the `SmallVector` formatter:
```
assert self.type_size != 0
```
This happens because `the_type.GetTemplateArgumentType(0)` returns
`None` (since `the_type` is a pointer to the `SmallVector`).

This patch dereferences `the_type` if it's a pointer type. We do this
for references already.

Differential Revision: https://reviews.llvm.org/D157961


  Commit: 92d7254a989d106ba63e64d315dbb9397c275671
      https://github.com/llvm/llvm-project/commit/92d7254a989d106ba63e64d315dbb9397c275671
  Author: Michael Buch <michaelbuch12 at gmail.com>
  Date:   2023-08-15 (Tue, 15 Aug 2023)

  Changed paths:
    M lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp

  Log Message:
  -----------
  [lldb][CPlusPlus][NFCI] Remove redundant construction of ClangASTImporter

The usage of this variable was removed in `4f14c17df70916913d71914343dd4f6c709e218d`.

This is no longer used inside this file. Since the call to
`GetPersistentExpressionStateForLanguage` has side-effects I marked this
NFCI. But there is no good reason we need this here.

Differential Revision: https://reviews.llvm.org/D157992


Compare: https://github.com/llvm/llvm-project/compare/95ae517bb4c3...92d7254a989d


More information about the All-commits mailing list